Changeset 11014 in josm for trunk/test
- Timestamp:
- 2016-09-17T21:57:10+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r10945 r11014 52 52 } 53 53 54 /** 55 * Test {@code natural=marsh}. 56 * @throws ParseException if a parsing error occurs 57 */ 54 58 @Test 55 public void testNaturalMarsh() throws Exception { 56 ParseResult result = MapCSSTagChecker.TagCheck.readMapCSS(new StringReader( "" +59 public void testNaturalMarsh() throws ParseException { 60 ParseResult result = MapCSSTagChecker.TagCheck.readMapCSS(new StringReader( 57 61 "*[natural=marsh] {\n" + 58 62 " group: tr(\"deprecated\");\n" + … … 86 90 } 87 91 92 /** 93 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/10913">Bug #10913</a>. 94 * @throws ParseException if a parsing error occurs 95 */ 88 96 @Test 89 public void testTicket10913() throws Exception { 97 public void testTicket10913() throws ParseException { 90 98 final OsmPrimitive p = OsmUtils.createPrimitive("way highway=tertiary construction=yes"); 91 99 final TagCheck check = TagCheck.readMapCSS(new StringReader("way {" + … … 101 109 } 102 110 111 /** 112 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/9782">Bug #9782</a>. 113 * @throws ParseException if a parsing error occurs 114 */ 103 115 @Test 104 public void testTicket9782() throws Exception { 116 public void testTicket9782() throws ParseException { 105 117 final MapCSSTagChecker test = buildTagChecker("*[/.+_name/][!name] {" + 106 118 "throwWarning: tr(\"has {0} but not {1}\", \"{0.key}\", \"{1.key}\");}"); … … 112 124 } 113 125 126 /** 127 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/10859">Bug #10859</a>. 128 * @throws ParseException if a parsing error occurs 129 */ 114 130 @Test 115 public void testTicket10859() throws Exception { 131 public void testTicket10859() throws ParseException { 116 132 final MapCSSTagChecker test = buildTagChecker("way[highway=footway][foot?!] {\n" + 117 133 " throwWarning: tr(\"{0} used with {1}\", \"{0.value}\", \"{1.tag}\");}"); … … 123 139 } 124 140 141 /** 142 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13630">Bug #13630</a>. 143 * @throws ParseException if a parsing error occurs 144 */ 125 145 @Test 126 public void testPreprocessing() throws Exception { 146 public void testTicket13630() throws ParseException { 147 ParseResult result = MapCSSTagChecker.TagCheck.readMapCSS(new StringReader( 148 "node[crossing=zebra] {fixRemove: \"crossing=zebra\";}")); 149 assertTrue(result.parseChecks.isEmpty()); 150 assertEquals(1, result.parseErrors.size()); 151 } 152 153 @Test 154 public void testPreprocessing() throws ParseException { 127 155 final MapCSSTagChecker test = buildTagChecker("" + 128 156 "@supports (min-josm-version: 1) { *[foo] { throwWarning: \"!\"; } }\n" +
Note:
See TracChangeset
for help on using the changeset viewer.