Changeset 18921 in josm for trunk/test/unit
- Timestamp:
- 2023-12-20T19:04:18+01:00 (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r18799 r18921 2 2 package org.openstreetmap.josm.data.validation.tests; 3 3 4 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; 4 5 import static org.junit.jupiter.api.Assertions.assertEquals; 5 6 import static org.junit.jupiter.api.Assertions.assertFalse; … … 31 32 import org.openstreetmap.josm.data.osm.OsmPrimitive; 32 33 import org.openstreetmap.josm.data.osm.OsmUtils; 34 import org.openstreetmap.josm.data.osm.Way; 33 35 import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry; 34 36 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper; … … 41 43 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; 42 44 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException; 45 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 43 46 import org.openstreetmap.josm.io.OsmReader; 44 47 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; … … 447 450 } 448 451 452 /** 453 * A water area inside a coastline, where the coastline way is oriented away from the water area 454 * (the water area is not inside the ocean). 455 */ 456 @Test 457 void testTicket23308() { 458 final MapCSSTagChecker test = new MapCSSTagChecker(); 459 final Way innerWay = TestUtils.newWay("natural=water", 460 new Node(new LatLon(32.775, -117.238)), 461 new Node(new LatLon(32.774, -117.238)), 462 new Node(new LatLon(32.774, -117.237)), 463 new Node(new LatLon(32.775, -117.237))); 464 final Way outerWay = TestUtils.newWay("natural=coastline", 465 new Node(new LatLon(32.779, -117.232)), 466 new Node(new LatLon(32.777, -117.241)), 467 new Node(new LatLon(32.771, -117.240)), 468 new Node(new LatLon(32.771, -117.235))); 469 final DataSet ds = new DataSet(); 470 ds.addPrimitiveRecursive(innerWay); 471 ds.addPrimitiveRecursive(outerWay); 472 innerWay.addNode(innerWay.firstNode()); 473 outerWay.addNode(outerWay.firstNode()); 474 assertDoesNotThrow(test::initialize); 475 test.startTest(NullProgressMonitor.INSTANCE); 476 test.visit(ds.allPrimitives()); 477 test.endTest(); 478 assertTrue(test.getErrors().isEmpty()); 479 } 449 480 }
Note:
See TracChangeset
for help on using the changeset viewer.