Changeset 8833 in josm for trunk/test/unit/org
- Timestamp:
- 2015-10-07T22:50:30+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ChildOrParentSelectorTest.groovy
r8774 r8833 2 2 package org.openstreetmap.josm.gui.mappaint.mapcss 3 3 4 import org.openstreetmap.josm. gui.mappaint.MultiCascade;5 6 import static org.junit.Assert.*4 import org.openstreetmap.josm.data.osm.OsmPrimitiveType 5 import org.openstreetmap.josm.gui.mappaint.MultiCascade 6 import org.openstreetmap.josm.io.OsmReader 7 7 8 8 import java.util.logging.Logger … … 182 182 assert selector.matches(e) 183 183 } 184 185 @Test 186 public void testContains() throws Exception { 187 def ds = OsmReader.parseDataSet(new FileInputStream("data_nodist/amenity-in-amenity.osm"), null) 188 def css = parse("node[tag(\"amenity\") = parent_tag(\"amenity\")] ∈ *[amenity] {}") 189 assert css.matches(new Environment(ds.getPrimitiveById(123, OsmPrimitiveType.WAY))) 190 assert css.matches(new Environment(ds.getPrimitiveById(123, OsmPrimitiveType.RELATION))) 191 } 184 192 }
Note:
See TracChangeset
for help on using the changeset viewer.