- Timestamp:
- 2021-04-11T12:35:13+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r17742 r17743 19 19 import org.junit.jupiter.api.Test; 20 20 import org.junit.jupiter.api.extension.RegisterExtension; 21 import org.junit.jupiter.params.ParameterizedTest; 22 import org.junit.jupiter.params.provider.ValueSource; 21 23 import org.openstreetmap.josm.TestUtils; 22 24 import org.openstreetmap.josm.data.coor.LatLon; … … 119 121 } 120 122 123 @ParameterizedTest 124 @ValueSource(strings = { 125 "way[railway][bridge=yes]::bridges { z-index: 1; casting-width: 4; casing-color: #797979 }", 126 "way[bridge=yes]::bridges { set .bridge }\nway[railway].bridge::bridges { z-index: 1; casting-width: 4; casing-color: #797979 }", 127 // FIXME "way[bridge=yes] { set .bridge }\nway[railway].bridge::bridges { z-index: 1; casting-width: 4; casing-color: #797979 }", 128 }) 129 void testLayerMatching(String cssString) { 130 MapCSSStyleSource css = new MapCSSStyleSource(cssString); 131 css.loadStyleSource(); 132 assertTrue(css.getErrors().isEmpty()); 133 MultiCascade mc1 = new MultiCascade(); 134 css.apply(mc1, OsmUtils.createPrimitive("way railway=rail bridge=yes"), 1, false); 135 assertNull(mc1.getCascade(null).get("casing-color", null, String.class)); 136 assertEquals("#797979", mc1.getCascade("bridges").get("casing-color", null, String.class)); 137 } 138 121 139 @Test 122 140 void testEqualCondition() throws Exception {
Note:
See TracChangeset
for help on using the changeset viewer.