- Timestamp:
- 2024-04-22T21:53:19+02:00 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/JosmDecimalFormatSymbolsProviderTest.java
r18799 r19053 3 3 4 4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertNotNull; 5 6 import static org.junit.jupiter.api.Assertions.assertTrue; 6 import static org.junit.jupiter.api.Assumptions.assumeTrue;7 7 8 8 import java.io.IOException; … … 23 23 @BeforeAll 24 24 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()); 32 31 } 33 32 } … … 36 35 void testGroupingSeparator() { 37 36 System.out.println(Locale.getDefault()); 38 assumeTrue(Utils.getJavaVersion() >= 9);39 37 40 38 assertTrue(I18n.getAvailableTranslations().count() > 10);
Note:
See TracChangeset
for help on using the changeset viewer.