Changeset 16667 in josm for trunk/test/unit


Ignore:
Timestamp:
2020-06-17T08:13:40+02:00 (4 years ago)
Author:
simon04
Message:

see #19397 - Fix unit tests on JDK8

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java

    r16666 r16667  
    2828import org.openstreetmap.josm.testutils.mockers.ExtendedDialogMocker;
    2929import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
     30import org.openstreetmap.josm.tools.Utils;
    3031
    3132import com.github.tomakehurst.wiremock.client.WireMock;
     
    99100    private File targetQuxJarNew;
    100101
    101     private final String bazPluginVersionReqString = "JOSM version 8\u202F001 required for plugin baz_plugin.";
    102     private final String dummyPluginVersionReqString = "JOSM version 7\u202F001 required for plugin dummy_plugin.";
     102    private final String bazPluginVersionReqString = u202f("JOSM version 8\u202F001 required for plugin baz_plugin.");
     103    private final String dummyPluginVersionReqString = u202f("JOSM version 7\u202F001 required for plugin dummy_plugin.");
    103104    private final String dummyPluginFailedString = "<html>Updating the following plugin has failed:<ul><li>dummy_plugin</li></ul>"
    104105        + "Please open the Preference Dialog after JOSM has started and try to update it manually.</html>";
     106
     107    private static String u202f(String s) {
     108        return Utils.getJavaVersion() < 9 ? s.replace('\u202F', ',') : s;
     109    }
    105110
    106111    /**
     
    311316        Config.getPref().putList("plugins", Arrays.asList("qux_plugin", "baz_plugin"));
    312317
    313         new ExtendedDialogMocker(Collections.singletonMap("JOSM version 7\u202F500 required for plugin qux_plugin.", "Download Plugin"));
     318        new ExtendedDialogMocker(Collections.singletonMap(u202f("JOSM version 7\u202F500 required for plugin qux_plugin."), "Download Plugin"));
    314319
    315320        Files.copy(this.referenceQuxJarOld.toPath(), this.targetQuxJar.toPath());
  • trunk/test/unit/org/openstreetmap/josm/tools/JosmDecimalFormatSymbolsProviderTest.java

    r16665 r16667  
    2929    @Test
    3030    public void testGroupingSeparator() {
     31        if (Utils.getJavaVersion() < 9) {
     32            // not supported
     33            return;
     34        }
    3135        assertTrue(I18n.getAvailableTranslations().count() > 10);
    3236        I18n.getAvailableTranslations().forEach(this::checkGroupingSymbol);
Note: See TracChangeset for help on using the changeset viewer.