Changeset 17770 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2021-04-13T21:12:10+02:00 (4 years ago)
Author:
simon04
Message:

see #20744, fix #20757 - MapCSS: fix NPE

Regression of r17758.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java

    r17769 r17770  
    721721        assertEquals("Error at line 1, column 17: Invalid pseudo class specified: foobar", sheet.getErrors().iterator().next().getMessage());
    722722    }
     723
     724    /**
     725     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/20757">Bug #20757</a>.
     726     */
     727    @Test
     728    void testTicket20757() {
     729        MapCSSStyleSource source = new MapCSSStyleSource("node {name: osm_user_name()}");
     730        source.loadStyleSource();
     731        MultiCascade mc = new MultiCascade();
     732        source.apply(mc, OsmUtils.createPrimitive("node"), 20, false);
     733        assertNull(mc.getCascade(null).get("name"));
     734    }
    723735}
Note: See TracChangeset for help on using the changeset viewer.