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


Ignore:
Timestamp:
2024-04-22T21:53:19+02:00 (7 months ago)
Author:
taylor.smock
Message:

See r19043: Drop COMPAT locale provider

Update a test that expected a specific locale provider order. This also removes
a Java >= 9 version check, since that is now always true.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/JosmDecimalFormatSymbolsProviderTest.java

    r18799 r19053  
    33
    44import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotNull;
    56import static org.junit.jupiter.api.Assertions.assertTrue;
    6 import static org.junit.jupiter.api.Assumptions.assumeTrue;
    77
    88import java.io.IOException;
     
    2323    @BeforeAll
    2424    static void beforeAll() throws IOException {
    25         if (Utils.getJavaVersion() >= 9) {
    26             assertEquals("SPI,JRE,CLDR", System.getProperty("java.locale.providers"),
    27                     "This test must be launched with -Djava.locale.providers=SPI,JRE,CLDR");
    28             try (InputStream in = I18n.class.getResourceAsStream("/META-INF/services/java.text.spi.DecimalFormatSymbolsProvider")) {
    29                 assertEquals("org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider",
    30                         new String(Utils.readBytesFromStream(in), StandardCharsets.UTF_8).trim());
    31             }
     25        assertEquals("SPI,CLDR", System.getProperty("java.locale.providers"),
     26                "This test must be launched with -Djava.locale.providers=SPI,CLDR");
     27        try (InputStream in = I18n.class.getResourceAsStream("/META-INF/services/java.text.spi.DecimalFormatSymbolsProvider")) {
     28            assertNotNull(in);
     29            assertEquals("org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider",
     30                    new String(in.readAllBytes(), StandardCharsets.UTF_8).trim());
    3231        }
    3332    }
     
    3635    void testGroupingSeparator() {
    3736        System.out.println(Locale.getDefault());
    38         assumeTrue(Utils.getJavaVersion() >= 9);
    3937
    4038        assertTrue(I18n.getAvailableTranslations().count() > 10);
Note: See TracChangeset for help on using the changeset viewer.