Changeset 16360 in josm


Ignore:
Timestamp:
2020-04-19T15:13:08+02:00 (5 years ago)
Author:
simon04
Message:

MapCSSTagChecker: remove method (only used in one test)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r16273 r16360  
    538538         *
    539539         * @param p the primitive to construct the error for
     540         * @param matchingSelector the matching selector (e.g., obtained via {@link #whichSelectorMatchesPrimitive})
     541         * @param env the environment
     542         * @param tester the tester
    540543         * @return an instance of {@link TestError}, or returns null if the primitive does not give rise to an error.
    541544         */
    542         List<TestError> getErrorsForPrimitive(OsmPrimitive p) {
    543             final Environment env = new Environment(p);
    544             return getErrorsForPrimitive(p, whichSelectorMatchesEnvironment(env), env, null);
    545         }
    546 
    547         private List<TestError> getErrorsForPrimitive(OsmPrimitive p, Selector matchingSelector, Environment env, Test tester) {
     545        protected List<TestError> getErrorsForPrimitive(OsmPrimitive p, Selector matchingSelector, Environment env, Test tester) {
    548546            List<TestError> res = new ArrayList<>();
    549547            if (matchingSelector != null && !errors.isEmpty()) {
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r16356 r16360  
    3838import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.ParseResult;
    3939import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck;
     40import org.openstreetmap.josm.gui.mappaint.Environment;
    4041import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    4142import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
     
    103104        assertTrue(check.test(n1));
    104105
    105         final Collection<TestError> errors = check.getErrorsForPrimitive(n1);
     106        final Collection<TestError> errors = check.getErrorsForPrimitive(n1, check.whichSelectorMatchesPrimitive(n1), new Environment(), null);
    106107        assertEquals(1, errors.size());
    107108        TestError err = errors.iterator().next();
Note: See TracChangeset for help on using the changeset viewer.