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


Ignore:
Timestamp:
2023-10-24T15:50:05+02:00 (13 months ago)
Author:
taylor.smock
Message:

See #23238: Some MapCSS functions cause NPEs when part of fixAdd

JOSM_Search doesn't trigger the issue unless the search string is non-empty.

File:
1 edited

Legend:

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

    r18875 r18876  
    260260    /**
    261261     * Non-regression test for #23238: NPE when env.osm is null
     262     * @see #testNonRegression23238JOSMSearch()
    262263     */
    263264    @ParameterizedTest
     
    288289        }
    289290    }
     291
     292    /**
     293     * Non-regression test for #23238: NPE when env.osm is null and {@link Functions#JOSM_search(Environment, String)}
     294     * has a non-empty search string.
     295     * @see #testNonRegression23238(Method)
     296     */
     297    @Test
     298    void testNonRegression23238JOSMSearch() {
     299        assertDoesNotThrow(() -> Functions.JOSM_search(new Environment(), "foobar"));
     300    }
    290301}
Note: See TracChangeset for help on using the changeset viewer.