Changeset 17601 in josm for trunk/test/unit
- Timestamp:
- 2021-03-20T14:00:16+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r17586 r17601 14 14 import java.util.Arrays; 15 15 import java.util.List; 16 import java.util.regex.Pattern; 16 17 17 18 import org.junit.Assert; … … 31 32 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyCondition; 32 33 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyMatchType; 34 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyRegexpCondition; 33 35 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition; 34 36 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op; … … 219 221 @Test 220 222 void testRegexKeyCondition() throws Exception { 221 KeyCondition c1 = (KeyCondition) getParser("[/.*:(backward|forward)$/]").condition(PRIMITIVE); 222 assertEquals( KeyMatchType.REGEX, c1.matchType);223 KeyRegexpCondition c1 = (KeyRegexpCondition) getParser("[/.*:(backward|forward)$/]").condition(PRIMITIVE); 224 assertEquals(Pattern.compile(".*:(backward|forward)$"), ((KeyRegexpCondition) c1).pattern); 223 225 assertFalse(c1.applies(getEnvironment("lanes", "3"))); 224 226 assertTrue(c1.applies(getEnvironment("lanes:forward", "3")));
Note:
See TracChangeset
for help on using the changeset viewer.