From 0e2c05160e45f9963088cc9e39a971a28b2e015e Mon Sep 17 00:00:00 2001
From: Michael Zangl <michael.zangl@student.kit.edu>
Date: Mon, 10 Aug 2015 13:41:45 +0200
Subject: [PATCH] Changed test case to test for EQ match type (instead of
null).
---
.../openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy b/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.groovy
index f9066d5..8a2be4f 100644
|
a
|
b
|
class MapCSSParserTest {
|
| 157 | 157 | @Test |
| 158 | 158 | public void testStandardKeyCondition() throws Exception { |
| 159 | 159 | def c1 = (Condition.KeyCondition) getParser("[ highway ]").condition(Condition.Context.PRIMITIVE) |
| 160 | | assert c1.matchType == null |
| | 160 | assert Condition.KeyMatchType.EQ.equals(c1.matchType) |
| 161 | 161 | assert c1.applies(getEnvironment("highway", "unclassified")) |
| 162 | 162 | assert !c1.applies(getEnvironment("railway", "rail")) |
| 163 | 163 | def c2 = (Condition.KeyCondition) getParser("[\"/slash/\"]").condition(Condition.Context.PRIMITIVE) |
| 164 | | assert c2.matchType == null |
| | 164 | assert Condition.KeyMatchType.EQ.equals(c2.matchType) |
| 165 | 165 | assert c2.applies(getEnvironment("/slash/", "yes")) |
| 166 | 166 | assert !c2.applies(getEnvironment("\"slash\"", "no")) |
| 167 | 167 | } |