Changeset 15064 in josm for trunk/test/unit


Ignore:
Timestamp:
2019-05-09T10:13:10+02:00 (5 years ago)
Author:
GerdP
Message:

fix #12627,#14287,#14289,#17695

  • let CrossingFinder and ContainsFinder find all objects instead of stopping at first match
  • if objects are selected, make sure that ContainsFinder is called for enclosing objects which are not in the selection
  • enable corresponding unit tests

Draw back: MapCSSTagChecker is a bit slower.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r14801 r15064  
    1616import java.util.Set;
    1717
    18 import org.junit.Ignore;
    1918import org.junit.Rule;
    2019import org.junit.Test;
     
    8786        new DataSet(n1, n2);
    8887        assertTrue(check.test(n1));
    89         assertEquals("deprecated", check.getErrorForPrimitive(n1).getMessage());
    90         assertEquals("natural=marsh is deprecated", check.getErrorForPrimitive(n1).getDescription());
    91         assertEquals(Severity.WARNING, check.getErrorForPrimitive(n1).getSeverity());
     88
     89        final Collection<TestError> errors = check.getErrorsForPrimitive(n1);
     90        assertEquals(1, errors.size());
     91        TestError err = errors.iterator().next();
     92        assertEquals("deprecated", err.getMessage());
     93        assertEquals("natural=marsh is deprecated", err.getDescription());
     94        assertEquals(Severity.WARNING, err.getSeverity());
    9295        assertEquals("Sequence: Fix of natural=marsh is deprecated", check.fixPrimitive(n1).getDescriptionText());
    9396        assertEquals("{natural=}", ((ChangePropertyCommand) check.fixPrimitive(n1).getChildren().iterator().next()).getTags().toString());
     
    240243     */
    241244    @Test
    242     @Ignore("not fixed yet")
    243245    public void testTicket14287() throws Exception {
    244246        final MapCSSTagChecker test = buildTagChecker(
     
    300302     */
    301303    @Test
    302     @Ignore("not fixed yet")
    303304    public void testTicket12627() throws Exception {
    304305        doTestNaturalWood(12627, "overlapping.osm", 1, 1);
     
    310311     */
    311312    @Test
    312     @Ignore("not fixed yet")
    313313    public void testTicket14289() throws Exception {
    314314        doTestNaturalWood(14289, "example2.osm", 3, 3);
Note: See TracChangeset for help on using the changeset viewer.