Changeset 17916 in josm for trunk/test/unit/org/openstreetmap/josm/gui/mappaint
- Timestamp:
- 2021-06-02T20:40:56+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r17832 r17916 615 615 "null1: tag(x1) + tag(x2);" + 616 616 "null2: 3 + tag(does_not_exist) + 5;" + 617 "rounding: concat(\"ele=\", round(tag(\"ele\")*100)/100);" + 617 618 "}"); 618 619 source.loadStyleSource(); … … 628 629 assertNull(mc.getCascade(null).get("null1")); 629 630 assertEquals(8.0, mc.getCascade(null).get("null2")); 631 assertEquals(8.0, mc.getCascade(null).get("rounding")); 630 632 } 631 633 … … 738 740 assertNull(mc.getCascade(null).get("name")); 739 741 } 742 743 /** 744 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/20957">Bug #20957</a>. 745 */ 746 @Test 747 void testTicket20957() { 748 MapCSSStyleSource source = new MapCSSStyleSource("node {fixAdd: concat(\"ele=\", round(tag(\"ele\")*100)/100)}"); 749 source.loadStyleSource(); 750 MultiCascade mc = new MultiCascade(); 751 source.apply(mc, OsmUtils.createPrimitive("node ele=12.123456"), 20, false); 752 assertEquals("ele=12.12", mc.getCascade(null).get("fixAdd")); 753 } 740 754 }
Note:
See TracChangeset
for help on using the changeset viewer.