Changeset 8494 in josm for trunk/test/unit


Ignore:
Timestamp:
2015-06-19T19:18:10+02:00 (9 years ago)
Author:
simon04
Message:

see #11150 - MapCSS: refactor pseudo classes to factory based instantiation; consider :sameTags, :same-tags, :same_tags equivalent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy

    r8415 r8494  
    5353        assert conditions.get(1) instanceof Condition.ClassCondition
    5454        assert conditions.get(2) instanceof Condition.PseudoClassCondition
     55        assert !conditions.get(2).applies(getEnvironment("name", "X"))
     56    }
     57
     58    @Test
     59    public void testPseudoClassCondition() throws Exception {
     60        def c1 = ((Selector.GeneralSelector) getParser("way!:area-style").selector()).conds.get(0)
     61        def c2 = ((Selector.GeneralSelector) getParser("way!:areaStyle").selector()).conds.get(0)
     62        def c3 = ((Selector.GeneralSelector) getParser("way!:area_style").selector()).conds.get(0)
     63        assert c1.toString() == "!:areaStyle"
     64        assert c2.toString() == "!:areaStyle"
     65        assert c3.toString() == "!:areaStyle"
    5566    }
    5667
Note: See TracChangeset for help on using the changeset viewer.