Changeset 14616 in josm for trunk


Ignore:
Timestamp:
2018-12-30T23:55:17+01:00 (5 years ago)
Author:
stoecker
Message:

see #16073 - output skipped ignores at the end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r14614 r14616  
    1212import java.util.ArrayList;
    1313import java.util.Collections;
     14import java.util.LinkedList;
    1415import java.util.List;
    1516import java.util.Locale;
     
    2425
    2526import org.apache.commons.jcs.access.CacheAccess;
     27import org.junit.AfterClass;
    2628import org.junit.BeforeClass;
    2729import org.junit.ClassRule;
     
    106108    private static TMSCachedTileLoaderJob helper;
    107109    private static List<String> errorsToIgnore;
     110    private static List<String> notIgnoredErrors;
    108111
    109112    /**
     
    115118        helper = new TMSCachedTileLoaderJob(null, null, new CacheAccess<>(null), new TileJobOptions(0, 0, null, 0), null);
    116119        errorsToIgnore = TestUtils.getIgnoredErrorMessages(ImageryPreferenceTestIT.class);
     120        notIgnoredErrors = new LinkedList<>(errorsToIgnore);
     121    }
     122
     123    /**
     124     * Cleanup test
     125     */
     126    @AfterClass
     127    public static void afterClass() {
     128        for (String e : notIgnoredErrors) {
     129            Logging.warn("Ignore line unused: " + e);
     130        }
    117131    }
    118132
     
    141155    private boolean addError(ImageryInfo info, String error) {
    142156        String errorMsg = error.replace('\n', ' ');
     157        if (notIgnoredErrors.contains(errorMsg))
     158            notIgnoredErrors.remove(errorMsg);
    143159        return addError(errorsToIgnore.contains(errorMsg) ? ignoredErrors : errors, info, errorMsg);
    144160    }
Note: See TracChangeset for help on using the changeset viewer.