Changeset 6740 in josm for trunk/test/unit/org/openstreetmap/josm
- Timestamp:
- 2014-01-19T20:30:57+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
r6737 r6740 11 11 import org.openstreetmap.josm.gui.mappaint.MultiCascade 12 12 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser 13 import org.openstreetmap.josm.tools.ColorHelper 13 14 import org.openstreetmap.josm.tools.Utils 14 15 … … 81 82 def mc3 = new MultiCascade() 82 83 css.apply(mc3, getPrimitive("highway", "footway"), 1, null, false); 83 assert Utils.hexToColor("#FF6644").equals(mc3.getCascade("default").get("color", null, Color.class))84 assert ColorHelper.html2color("#FF6644").equals(mc3.getCascade("default").get("color", null, Color.class)) 84 85 } 85 86 … … 217 218 assert mc.getCascade(Environment.DEFAULT_LAYER).get("text") == "15 - 1.5 - Foo" 218 219 } 220 221 @Test 222 public void testColorNameTicket9191() throws Exception { 223 def e = new Environment(null, new MultiCascade(), Environment.DEFAULT_LAYER, null) 224 getParser("{color: testcolour1#88DD22}").declaration().get(0).execute(e) 225 def expected = new Color(0x88DD22) 226 assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected 227 assert Main.pref.getDefaultColor("MapCSS.testcolour1") == expected 228 } 219 229 }
Note:
See TracChangeset
for help on using the changeset viewer.