1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.validation.tests;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 | import static org.junit.Assert.assertFalse;
|
---|
6 | import static org.junit.Assert.assertNotNull;
|
---|
7 | import static org.junit.Assert.assertTrue;
|
---|
8 |
|
---|
9 | import java.io.InputStream;
|
---|
10 | import java.io.StringReader;
|
---|
11 | import java.util.Collection;
|
---|
12 | import java.util.HashSet;
|
---|
13 | import java.util.Iterator;
|
---|
14 | import java.util.LinkedHashSet;
|
---|
15 | import java.util.List;
|
---|
16 | import java.util.Set;
|
---|
17 |
|
---|
18 | import org.junit.Before;
|
---|
19 | import org.junit.Rule;
|
---|
20 | import org.junit.Test;
|
---|
21 | import org.openstreetmap.josm.TestUtils;
|
---|
22 | import org.openstreetmap.josm.command.ChangePropertyCommand;
|
---|
23 | import org.openstreetmap.josm.command.ChangePropertyKeyCommand;
|
---|
24 | import org.openstreetmap.josm.command.Command;
|
---|
25 | import org.openstreetmap.josm.command.PseudoCommand;
|
---|
26 | import org.openstreetmap.josm.command.SequenceCommand;
|
---|
27 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
28 | import org.openstreetmap.josm.data.osm.IPrimitive;
|
---|
29 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
30 | import org.openstreetmap.josm.data.osm.OsmUtils;
|
---|
31 | import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
|
---|
32 | import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper;
|
---|
33 | import org.openstreetmap.josm.data.validation.Severity;
|
---|
34 | import org.openstreetmap.josm.data.validation.TestError;
|
---|
35 | import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.ParseResult;
|
---|
36 | import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck;
|
---|
37 | import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
|
---|
38 | import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
|
---|
39 | import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
|
---|
40 | import org.openstreetmap.josm.io.OsmReader;
|
---|
41 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
42 | import org.openstreetmap.josm.tools.Logging;
|
---|
43 |
|
---|
44 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * JUnit Test of {@link MapCSSTagChecker}.
|
---|
48 | */
|
---|
49 | public class MapCSSTagCheckerTest {
|
---|
50 |
|
---|
51 | /**
|
---|
52 | * Setup test.
|
---|
53 | */
|
---|
54 | @Rule
|
---|
55 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
56 | public JOSMTestRules test = new JOSMTestRules().projection().territories().preferences();
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * Setup test.
|
---|
60 | */
|
---|
61 | @Before
|
---|
62 | public void setUp() {
|
---|
63 | MapCSSTagCheckerAsserts.clear();
|
---|
64 | }
|
---|
65 |
|
---|
66 | static MapCSSTagChecker buildTagChecker(String css) throws ParseException {
|
---|
67 | final MapCSSTagChecker test = new MapCSSTagChecker();
|
---|
68 | Set<String> errors = new HashSet<>();
|
---|
69 | test.checks.putAll("test", TagCheck.readMapCSS(new StringReader(css), errors::add).parseChecks);
|
---|
70 | assertTrue(errors.toString(), errors.isEmpty());
|
---|
71 | return test;
|
---|
72 | }
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * Test {@code natural=marsh}.
|
---|
76 | * @throws ParseException if a parsing error occurs
|
---|
77 | */
|
---|
78 | @Test
|
---|
79 | public void testNaturalMarsh() throws ParseException {
|
---|
80 | ParseResult result = TagCheck.readMapCSS(new StringReader(
|
---|
81 | "*[natural=marsh] {\n" +
|
---|
82 | " group: tr(\"deprecated\");\n" +
|
---|
83 | " throwWarning: tr(\"{0}={1} is deprecated\", \"{0.key}\", tag(\"natural\"));\n" +
|
---|
84 | " fixRemove: \"{0.key}\";\n" +
|
---|
85 | " fixAdd: \"natural=wetland\";\n" +
|
---|
86 | " fixAdd: \"wetland=marsh\";\n" +
|
---|
87 | "}"));
|
---|
88 | final List<TagCheck> checks = result.parseChecks;
|
---|
89 | assertEquals(1, checks.size());
|
---|
90 | assertTrue(result.parseErrors.isEmpty());
|
---|
91 | final TagCheck check = checks.get(0);
|
---|
92 | assertNotNull(check);
|
---|
93 | assertEquals("{0.key}=null is deprecated", check.getDescription(null));
|
---|
94 | assertEquals("fixRemove: {0.key}", check.fixCommands.get(0).toString());
|
---|
95 | assertEquals("fixAdd: natural=wetland", check.fixCommands.get(1).toString());
|
---|
96 | assertEquals("fixAdd: wetland=marsh", check.fixCommands.get(2).toString());
|
---|
97 | final OsmPrimitive n1 = OsmUtils.createPrimitive("node natural=marsh");
|
---|
98 | final OsmPrimitive n2 = OsmUtils.createPrimitive("node natural=wood");
|
---|
99 | new DataSet(n1, n2);
|
---|
100 | assertTrue(check.test(n1));
|
---|
101 |
|
---|
102 | final Collection<TestError> errors = check.getErrorsForPrimitive(n1);
|
---|
103 | assertEquals(1, errors.size());
|
---|
104 | TestError err = errors.iterator().next();
|
---|
105 | assertEquals("deprecated", err.getMessage());
|
---|
106 | assertEquals("natural=marsh is deprecated", err.getDescription());
|
---|
107 | assertEquals(Severity.WARNING, err.getSeverity());
|
---|
108 | assertEquals("Sequence: Fix of natural=marsh is deprecated", check.fixPrimitive(n1).getDescriptionText());
|
---|
109 | assertEquals("{natural=}", ((ChangePropertyCommand) check.fixPrimitive(n1).getChildren().iterator().next()).getTags().toString());
|
---|
110 | assertFalse(check.test(n2));
|
---|
111 | assertEquals("The key is natural and the value is marsh",
|
---|
112 | TagCheck.insertArguments(check.rule.selectors.get(0), "The key is {0.key} and the value is {0.value}", null));
|
---|
113 | }
|
---|
114 |
|
---|
115 | /**
|
---|
116 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/10913">Bug #10913</a>.
|
---|
117 | * @throws ParseException if a parsing error occurs
|
---|
118 | */
|
---|
119 | @Test
|
---|
120 | public void testTicket10913() throws ParseException {
|
---|
121 | final OsmPrimitive p = TestUtils.addFakeDataSet(TestUtils.newWay("highway=tertiary construction=yes"));
|
---|
122 | final TagCheck check = TagCheck.readMapCSS(new StringReader("way {" +
|
---|
123 | "throwError: \"error\";" +
|
---|
124 | "fixChangeKey: \"highway => construction\";\n" +
|
---|
125 | "fixAdd: \"highway=construction\";\n" +
|
---|
126 | "}")).parseChecks.get(0);
|
---|
127 | final Command command = check.fixPrimitive(p);
|
---|
128 | assertTrue(command instanceof SequenceCommand);
|
---|
129 | final Iterator<PseudoCommand> it = command.getChildren().iterator();
|
---|
130 | assertTrue(it.next() instanceof ChangePropertyKeyCommand);
|
---|
131 | assertTrue(it.next() instanceof ChangePropertyCommand);
|
---|
132 | }
|
---|
133 |
|
---|
134 | /**
|
---|
135 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/9782">Bug #9782</a>.
|
---|
136 | * @throws ParseException if a parsing error occurs
|
---|
137 | */
|
---|
138 | @Test
|
---|
139 | public void testTicket9782() throws ParseException {
|
---|
140 | final MapCSSTagChecker test = buildTagChecker("*[/.+_name/][!name] {" +
|
---|
141 | "throwWarning: tr(\"has {0} but not {1}\", \"{0.key}\", \"{1.key}\");}");
|
---|
142 | final OsmPrimitive p = OsmUtils.createPrimitive("way alt_name=Foo");
|
---|
143 | final Collection<TestError> errors = test.getErrorsForPrimitive(p, false);
|
---|
144 | assertEquals(1, errors.size());
|
---|
145 | assertEquals("has alt_name but not name", errors.iterator().next().getMessage());
|
---|
146 | assertEquals("3000_*[.+_name][!name]", errors.iterator().next().getIgnoreSubGroup());
|
---|
147 | }
|
---|
148 |
|
---|
149 | /**
|
---|
150 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/10859">Bug #10859</a>.
|
---|
151 | * @throws ParseException if a parsing error occurs
|
---|
152 | */
|
---|
153 | @Test
|
---|
154 | public void testTicket10859() throws ParseException {
|
---|
155 | final MapCSSTagChecker test = buildTagChecker("way[highway=footway][foot?!] {\n" +
|
---|
156 | " throwWarning: tr(\"{0} used with {1}\", \"{0.value}\", \"{1.tag}\");}");
|
---|
157 | final OsmPrimitive p = OsmUtils.createPrimitive("way highway=footway foot=no");
|
---|
158 | final Collection<TestError> errors = test.getErrorsForPrimitive(p, false);
|
---|
159 | assertEquals(1, errors.size());
|
---|
160 | assertEquals("footway used with foot=no", errors.iterator().next().getMessage());
|
---|
161 | assertEquals("3000_way[highway=footway][foot]", errors.iterator().next().getIgnoreSubGroup());
|
---|
162 | }
|
---|
163 |
|
---|
164 | /**
|
---|
165 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13630">Bug #13630</a>.
|
---|
166 | * @throws ParseException if a parsing error occurs
|
---|
167 | */
|
---|
168 | @Test
|
---|
169 | public void testTicket13630() throws ParseException {
|
---|
170 | ParseResult result = TagCheck.readMapCSS(new StringReader(
|
---|
171 | "node[crossing=zebra] {fixRemove: \"crossing=zebra\";}"));
|
---|
172 | assertTrue(result.parseChecks.isEmpty());
|
---|
173 | assertEquals(1, result.parseErrors.size());
|
---|
174 | }
|
---|
175 |
|
---|
176 | /**
|
---|
177 | * Unit test of {@code min-josm-version} processing.
|
---|
178 | * @throws ParseException if a parsing error occurs
|
---|
179 | */
|
---|
180 | @Test
|
---|
181 | public void testPreprocessing() throws ParseException {
|
---|
182 | final MapCSSTagChecker test = buildTagChecker("" +
|
---|
183 | "@supports (min-josm-version: 1) { *[foo] { throwWarning: \"!\"; } }\n" +
|
---|
184 | "@supports (min-josm-version: 2147483647) { *[bar] { throwWarning: \"!\"; } }\n");
|
---|
185 | assertEquals(1, test.getErrorsForPrimitive(OsmUtils.createPrimitive("way foo=1"), false).size());
|
---|
186 | assertEquals(0, test.getErrorsForPrimitive(OsmUtils.createPrimitive("way bar=1"), false).size());
|
---|
187 | }
|
---|
188 |
|
---|
189 | /**
|
---|
190 | * Unit test of {@link MapCSSTagChecker#initialize}.
|
---|
191 | * @throws Exception if an error occurs
|
---|
192 | */
|
---|
193 | @Test
|
---|
194 | public void testInit() throws Exception {
|
---|
195 | MapCSSTagChecker c = new MapCSSTagChecker();
|
---|
196 | c.initialize();
|
---|
197 | }
|
---|
198 |
|
---|
199 | /**
|
---|
200 | * Unit test for all {@link MapCSSTagChecker.TagTest} assertions.
|
---|
201 | * @throws Exception if an error occurs
|
---|
202 | */
|
---|
203 | @Test
|
---|
204 | public void testAssertions() throws Exception {
|
---|
205 | MapCSSTagChecker c = new MapCSSTagChecker();
|
---|
206 | Set<String> assertionErrors = new LinkedHashSet<>();
|
---|
207 |
|
---|
208 | // initialize
|
---|
209 | for (ExtendedSourceEntry entry : ValidatorPrefHelper.INSTANCE.getDefault()) {
|
---|
210 | c.addMapCSS(entry.url, assertionErrors::add);
|
---|
211 | }
|
---|
212 |
|
---|
213 | for (String msg : assertionErrors) {
|
---|
214 | Logging.error(msg);
|
---|
215 | }
|
---|
216 | assertTrue("not all assertions included in the tests are met", assertionErrors.isEmpty());
|
---|
217 | }
|
---|
218 |
|
---|
219 | /**
|
---|
220 | * Checks that assertions work for country-specific checks.
|
---|
221 | * @throws ParseException if a parsing error occurs
|
---|
222 | */
|
---|
223 | @Test
|
---|
224 | public void testAssertInsideCountry() throws ParseException {
|
---|
225 | final MapCSSTagChecker test = buildTagChecker(
|
---|
226 | "node[amenity=parking][inside(\"BR\")] {\n" +
|
---|
227 | " throwWarning: \"foo\";\n" +
|
---|
228 | " assertMatch: \"node amenity=parking\";\n" +
|
---|
229 | " assertNoMatch: \"node amenity=restaurant\";\n" +
|
---|
230 | "}");
|
---|
231 | assertNotNull(test);
|
---|
232 | }
|
---|
233 |
|
---|
234 | /**
|
---|
235 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17058">Bug #17058</a>.
|
---|
236 | * @throws ParseException if a parsing error occurs
|
---|
237 | */
|
---|
238 | @Test
|
---|
239 | public void testTicket17058() throws ParseException {
|
---|
240 | final MapCSSTagChecker test = buildTagChecker(
|
---|
241 | "*[name =~ /(?i).*Straße.*/][inside(\"LI,CH\")] {\n" +
|
---|
242 | " throwError: tr(\"street name contains ß\");\n" +
|
---|
243 | " assertMatch: \"way name=Hauptstraße\";\n" +
|
---|
244 | " assertNoMatch: \"way name=Hauptstrasse\";\n" +
|
---|
245 | "}");
|
---|
246 | assertNotNull(test);
|
---|
247 | }
|
---|
248 |
|
---|
249 | /**
|
---|
250 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13762">Bug #13762</a>.
|
---|
251 | * @throws ParseException if a parsing error occurs
|
---|
252 | */
|
---|
253 | @Test
|
---|
254 | public void testTicket13762() throws ParseException {
|
---|
255 | final ParseResult parseResult = TagCheck.readMapCSS(new StringReader("" +
|
---|
256 | "meta[lang=de] {\n" +
|
---|
257 | " title: \"Deutschlandspezifische Regeln\";" +
|
---|
258 | "}"));
|
---|
259 | assertTrue(parseResult.parseErrors.isEmpty());
|
---|
260 | }
|
---|
261 |
|
---|
262 | /**
|
---|
263 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14287">Bug #14287</a>.
|
---|
264 | * @throws Exception if an error occurs
|
---|
265 | */
|
---|
266 | @Test
|
---|
267 | public void testTicket14287() throws Exception {
|
---|
268 | final MapCSSTagChecker test = buildTagChecker(
|
---|
269 | "node[amenity=parking] ∈ *[amenity=parking] {" +
|
---|
270 | " throwWarning: tr(\"{0} inside {1}\", \"amenity=parking\", \"amenity=parking\");" +
|
---|
271 | "}");
|
---|
272 | try (InputStream is = TestUtils.getRegressionDataStream(14287, "example.osm")) {
|
---|
273 | test.visit(OsmReader.parseDataSet(is, null).allPrimitives());
|
---|
274 | assertEquals(6, test.getErrors().size());
|
---|
275 | }
|
---|
276 | }
|
---|
277 |
|
---|
278 | /**
|
---|
279 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17053">Bug #17053</a>.
|
---|
280 | * @throws ParseException if a parsing error occurs
|
---|
281 | */
|
---|
282 | @Test
|
---|
283 | public void testTicket17053() throws ParseException {
|
---|
284 | final MapCSSTagChecker test = buildTagChecker(
|
---|
285 | "way[highway=cycleway][cycleway=track] {\n" +
|
---|
286 | " throwWarning: tr(\"{0} with {1}\", \"{0.tag}\", \"{1.tag}\");\n" +
|
---|
287 | " -osmoseItemClassLevel: \"3032/30328/2\";\n" +
|
---|
288 | " -osmoseTags: list(\"tag\", \"highway\", \"cycleway\");\n" +
|
---|
289 | " fixRemove: \"cycleway\";\n" +
|
---|
290 | "}");
|
---|
291 | assertEquals(1, test.checks.size());
|
---|
292 | TagCheck check = test.checks.get("test").iterator().next();
|
---|
293 | assertEquals(1, check.fixCommands.size());
|
---|
294 | assertEquals(2, check.rule.declaration.instructions.size());
|
---|
295 | }
|
---|
296 |
|
---|
297 | private void doTestNaturalWood(int ticket, String filename, int errorsCount, int setsCount) throws Exception {
|
---|
298 | final MapCSSTagChecker test = buildTagChecker(
|
---|
299 | "area:closed:areaStyle[tag(\"natural\") = parent_tag(\"natural\")] ⧉ area:closed:areaStyle[natural] {" +
|
---|
300 | " throwWarning: tr(\"Overlapping Identical Natural Areas\");" +
|
---|
301 | "}");
|
---|
302 | final MapCSSStyleSource style = new MapCSSStyleSource(
|
---|
303 | "area[natural=wood] {" +
|
---|
304 | " fill-color: woodarea#008000;" +
|
---|
305 | "}");
|
---|
306 | MapPaintStyles.addStyle(style);
|
---|
307 | try (InputStream is = TestUtils.getRegressionDataStream(ticket, filename)) {
|
---|
308 | test.visit(OsmReader.parseDataSet(is, null).allPrimitives());
|
---|
309 | List<TestError> errors = test.getErrors();
|
---|
310 | assertEquals(errorsCount, errors.size());
|
---|
311 | Set<Set<IPrimitive>> primitives = new HashSet<>();
|
---|
312 | for (TestError e : errors) {
|
---|
313 | primitives.add(new HashSet<>(e.getPrimitives()));
|
---|
314 | }
|
---|
315 | assertEquals(setsCount, primitives.size());
|
---|
316 | } finally {
|
---|
317 | MapPaintStyles.removeStyle(style);
|
---|
318 | }
|
---|
319 | }
|
---|
320 |
|
---|
321 | /**
|
---|
322 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12627">Bug #12627</a>.
|
---|
323 | * @throws Exception if an error occurs
|
---|
324 | */
|
---|
325 | @Test
|
---|
326 | public void testTicket12627() throws Exception {
|
---|
327 | doTestNaturalWood(12627, "overlapping.osm", 1, 1);
|
---|
328 | }
|
---|
329 |
|
---|
330 | /**
|
---|
331 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14289">Bug #14289</a>.
|
---|
332 | * @throws Exception if an error occurs
|
---|
333 | */
|
---|
334 | @Test
|
---|
335 | public void testTicket14289() throws Exception {
|
---|
336 | doTestNaturalWood(14289, "example2.osm", 3, 3);
|
---|
337 | }
|
---|
338 |
|
---|
339 | /**
|
---|
340 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/15641">Bug #15641</a>.
|
---|
341 | * @throws ParseException if an error occurs
|
---|
342 | */
|
---|
343 | @Test
|
---|
344 | public void testTicket15641() throws ParseException {
|
---|
345 | assertNotNull(buildTagChecker(
|
---|
346 | "relation[type=public_transport][public_transport=stop_area_group] > way {" +
|
---|
347 | " throwWarning: eval(count(parent_tags(public_transport)));" +
|
---|
348 | "}"));
|
---|
349 | }
|
---|
350 |
|
---|
351 | /**
|
---|
352 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17358">Bug #17358</a>.
|
---|
353 | * @throws ParseException if an error occurs
|
---|
354 | */
|
---|
355 | @Test
|
---|
356 | public void testTicket17358() throws ParseException {
|
---|
357 | final Collection<TestError> errors = buildTagChecker(
|
---|
358 | "*[/^name/=~/Test/]{" +
|
---|
359 | " throwWarning: \"Key value match\";" +
|
---|
360 | "}").getErrorsForPrimitive(OsmUtils.createPrimitive("way name=Test St"), false);
|
---|
361 | assertEquals(1, errors.size());
|
---|
362 | }
|
---|
363 |
|
---|
364 | /**
|
---|
365 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17695">Bug #17695</a>.
|
---|
366 | * @throws Exception if an error occurs
|
---|
367 | */
|
---|
368 | @Test
|
---|
369 | public void testTicket17695() throws Exception {
|
---|
370 | final MapCSSTagChecker test = buildTagChecker(
|
---|
371 | "*[building] ∈ *[building] {" +
|
---|
372 | "throwWarning: tr(\"Building inside building\");" +
|
---|
373 | "}");
|
---|
374 | try (InputStream is = TestUtils.getRegressionDataStream(17695, "bib2.osm")) {
|
---|
375 | test.visit(OsmReader.parseDataSet(is, null).allPrimitives());
|
---|
376 | List<TestError> errors = test.getErrors();
|
---|
377 | assertEquals(6, errors.size());
|
---|
378 | }
|
---|
379 | }
|
---|
380 |
|
---|
381 | /**
|
---|
382 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13165">Bug #13165</a>.
|
---|
383 | * @throws Exception if an error occurs
|
---|
384 | */
|
---|
385 | @Test
|
---|
386 | public void testTicket13165() throws Exception {
|
---|
387 | final MapCSSTagChecker test = buildTagChecker(
|
---|
388 | "area:closed[tag(\"landuse\") = parent_tag(\"landuse\")] ⧉ area:closed[landuse] {"
|
---|
389 | + "throwWarning: tr(\"Overlapping Identical Landuses\");"
|
---|
390 | + "}");
|
---|
391 | try (InputStream is = TestUtils.getRegressionDataStream(13165, "13165.osm")) {
|
---|
392 | test.visit(OsmReader.parseDataSet(is, null).allPrimitives());
|
---|
393 | List<TestError> errors = test.getErrors();
|
---|
394 | assertEquals(3, errors.size());
|
---|
395 | }
|
---|
396 | }
|
---|
397 |
|
---|
398 | /**
|
---|
399 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13165">Bug #13165</a>.
|
---|
400 | * @throws Exception if an error occurs
|
---|
401 | */
|
---|
402 | @Test
|
---|
403 | public void testTicket13165IncompleteMP() throws Exception {
|
---|
404 | final MapCSSTagChecker test = buildTagChecker(
|
---|
405 | "area:closed[tag(\"landuse\") = parent_tag(\"landuse\")] ⧉ area:closed[landuse] {"
|
---|
406 | + "throwWarning: tr(\"Overlapping Identical Landuses\");"
|
---|
407 | + "}");
|
---|
408 | try (InputStream is = TestUtils.getRegressionDataStream(13165, "13165-incomplete.osm.bz2")) {
|
---|
409 | test.visit(OsmReader.parseDataSet(is, null).allPrimitives());
|
---|
410 | List<TestError> errors = test.getErrors();
|
---|
411 | assertEquals(3, errors.size());
|
---|
412 | }
|
---|
413 | }
|
---|
414 |
|
---|
415 | }
|
---|