Changeset 15245 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-07-13T18:41:24+02:00 (5 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactoryTest.java
r11921 r15245 4 4 import org.junit.Rule; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory.Functions;7 6 import org.openstreetmap.josm.testutils.JOSMTestRules; 8 7 -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r15196 r15245 422 422 /* Check with empty role and one object */ 423 423 Environment e = new Environment(rel1, new MultiCascade(), Environment.DEFAULT_LAYER, null); 424 assertEquals(1, ExpressionFactory.Functions.count_roles(e, ""));424 assertEquals(1, Functions.count_roles(e, "")); 425 425 426 426 /* Check with non-empty role and one object */ 427 427 e = new Environment(rel1, new MultiCascade(), Environment.DEFAULT_LAYER, null); 428 assertEquals(0, ExpressionFactory.Functions.count_roles(e, "from"));428 assertEquals(0, Functions.count_roles(e, "from")); 429 429 430 430 /* Check with empty role and two objects */ … … 433 433 rel1.addMember(new RelationMember("", way2)); 434 434 e = new Environment(rel1, new MultiCascade(), Environment.DEFAULT_LAYER, null); 435 assertEquals(2, ExpressionFactory.Functions.count_roles(e, ""));435 assertEquals(2, Functions.count_roles(e, "")); 436 436 437 437 /* Check with non-empty role and two objects */ 438 438 rel1.setMember(0, new RelationMember("from", way1)); 439 439 e = new Environment(rel1, new MultiCascade(), Environment.DEFAULT_LAYER, null); 440 assertEquals(1, ExpressionFactory.Functions.count_roles(e, "from"));440 assertEquals(1, Functions.count_roles(e, "from")); 441 441 442 442 /* Check with multiple roles */ 443 assertEquals(1, ExpressionFactory.Functions.count_roles(e, "from", "to"));443 assertEquals(1, Functions.count_roles(e, "from", "to")); 444 444 445 445 /* Check with non-relation */ 446 446 e = new Environment(way1, new MultiCascade(), Environment.DEFAULT_LAYER, null); 447 assertEquals(0, ExpressionFactory.Functions.count_roles(e, "from", "to"));447 assertEquals(0, Functions.count_roles(e, "from", "to")); 448 448 } 449 449
Note:
See TracChangeset
for help on using the changeset viewer.