Changeset 6774 in josm for trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
- Timestamp:
- 2014-01-29T22:15:06+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
r6740 r6774 225 225 def expected = new Color(0x88DD22) 226 226 assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected 227 assert Main.pref.getDefaultColor("MapCSS.testcolour1") == expected 227 assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour1") == expected 228 } 229 230 @Test 231 public void testColorNameTicket9191Alpha() throws Exception { 232 def e = new Environment(null, new MultiCascade(), Environment.DEFAULT_LAYER, null) 233 getParser("{color: testcolour2#12345678}").declaration().get(0).execute(e) 234 def expected = new Color(0x12, 0x34, 0x56, 0x78) 235 assert e.getCascade(Environment.DEFAULT_LAYER).get("color") == expected 236 assert Main.pref.getDefaultColor("mappaint.mapcss.testcolour2") == expected 237 } 238 239 @Test 240 public void testColorParsing() throws Exception { 241 assert ColorHelper.html2color("#12345678") == new Color(0x12, 0x34, 0x56, 0x78) 228 242 } 229 243 }
Note:
See TracChangeset
for help on using the changeset viewer.