Changeset 6736 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2014-01-19T17:46:33+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
r6561 r6736 3 3 import org.junit.Before 4 4 import org.junit.Test 5 import org.openstreetmap.TestUtils 5 6 import org.openstreetmap.josm.Main 6 7 import org.openstreetmap.josm.data.Preferences … … 181 182 assert !c2.applies(new Environment().withPrimitive(w2)) 182 183 } 184 185 @Test 186 public void testTicket8568() throws Exception { 187 def sheet = new MapCSSStyleSource("") 188 getParser("" + 189 "way { width: 5; }\n" + 190 "way[keyA], way[keyB] { width: eval(prop(width)+10); }").sheet(sheet) 191 def mc = new MultiCascade() 192 sheet.apply(mc, TestUtils.createPrimitive("way foo=bar"), 20, null, false) 193 assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 5 194 sheet.apply(mc, TestUtils.createPrimitive("way keyA=true"), 20, null, false) 195 assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15 196 sheet.apply(mc, TestUtils.createPrimitive("way keyB=true"), 20, null, false) 197 assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15 198 sheet.apply(mc, TestUtils.createPrimitive("way keyA=true keyB=true"), 20, null, false) 199 assert mc.getCascade(Environment.DEFAULT_LAYER).get("width") == 15 200 } 183 201 }
Note:
See TracChangeset
for help on using the changeset viewer.