Changeset 6561 in josm for trunk/test


Ignore:
Timestamp:
2013-12-29T12:43:55+01:00 (10 years ago)
Author:
simon04
Message:

see #9485 - MapCSS: add support for set .class_name instruction (with optional . before class), define Range.ZERO_TO_INFINITY

File:
1 edited

Legend:

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

    r6560 r6561  
    1010import org.openstreetmap.josm.gui.mappaint.MultiCascade
    1111import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser
     12import org.openstreetmap.josm.tools.Utils
     13
     14import java.awt.Color
    1215
    1316class MapCSSParserTest {
     
    6063        def css = new MapCSSStyleSource("")
    6164        getParser("" +
    62                 "way[highway=footway] { set path; color: #FF6644; width: 2; }\n" +
     65                "way[highway=footway] { set .path; color: #FF6644; width: 2; }\n" +
    6366                "way[highway=path]    { set path; color: brown; width: 2; }\n" +
    6467                "way[\"set\"=escape]  {  }\n" +
     
    7578        assert "orange".equals(mc2.getCascade("default").get("color", null, String.class))
    7679        assert mc2.getCascade("default").get("text-color", null, String.class) == null
     80        def mc3 = new MultiCascade()
     81        css.apply(mc3, getPrimitive("highway", "footway"), 1, null, false);
     82        assert Utils.hexToColor("#FF6644").equals(mc3.getCascade("default").get("color", null, Color.class))
    7783    }
    7884
Note: See TracChangeset for help on using the changeset viewer.