8358095: Cleanup tests with explicit locale provider set to only CLDR
Reviewed-by: bpb, naoto
This commit is contained in:
parent
16e120b008
commit
04c15466f6
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* @summary Basic tests for currency formatting.
|
* @summary Basic tests for currency formatting.
|
||||||
* Tests both COMPAT and CLDR data.
|
* Tests both COMPAT and CLDR data.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run junit/othervm -Djava.locale.providers=CLDR CurrencyFormat
|
* @run junit CurrencyFormat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -29,7 +29,7 @@
|
|||||||
* @modules java.base/sun.util.locale.provider
|
* @modules java.base/sun.util.locale.provider
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @compile -XDignore.symbol.file Bug8007038.java
|
* @compile -XDignore.symbol.file Bug8007038.java
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR Bug8007038 CLDR
|
* @run main Bug8007038 CLDR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -35,7 +35,7 @@
|
|||||||
* java.base/sun.util.spi
|
* java.base/sun.util.spi
|
||||||
* jdk.localedata
|
* jdk.localedata
|
||||||
* @run main Bug8167273 testEraName
|
* @run main Bug8167273 testEraName
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR Bug8167273 testCldr
|
* @run main Bug8167273 testCldr
|
||||||
* @run main Bug8167273 testEmptyEraNames
|
* @run main Bug8167273 testEmptyEraNames
|
||||||
*/
|
*/
|
||||||
import java.text.DateFormatSymbols;
|
import java.text.DateFormatSymbols;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* @modules java.base/sun.util.locale.provider
|
* @modules java.base/sun.util.locale.provider
|
||||||
* jdk.localedata
|
* jdk.localedata
|
||||||
* @compile -XDignore.symbol.file CldrFormatNamesTest.java
|
* @compile -XDignore.symbol.file CldrFormatNamesTest.java
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR CldrFormatNamesTest
|
* @run main CldrFormatNamesTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,12 +26,9 @@
|
|||||||
* @bug 8003267
|
* @bug 8003267
|
||||||
* @summary Unit test for generic time zone names support. This test is locale
|
* @summary Unit test for generic time zone names support. This test is locale
|
||||||
* data-dependent and assumes that both JRE and CLDR have the same
|
* data-dependent and assumes that both JRE and CLDR have the same
|
||||||
* geneic time zone names in English.
|
* generic time zone names in English.
|
||||||
* @modules java.base/sun.util.locale.provider
|
* @modules java.base/sun.util.locale.provider
|
||||||
* @comment Locale providers: default
|
|
||||||
* @run main GenericTimeZoneNamesTest en-US
|
* @run main GenericTimeZoneNamesTest en-US
|
||||||
* @comment Locale providers: CLDR
|
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR GenericTimeZoneNamesTest en-US
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -27,8 +27,7 @@
|
|||||||
* @summary Test the localized Japanese new era name (May 1st. 2019-)
|
* @summary Test the localized Japanese new era name (May 1st. 2019-)
|
||||||
* is retrieved no matter CLDR provider contains the name or not.
|
* is retrieved no matter CLDR provider contains the name or not.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run testng/othervm JapaneseEraNameTest
|
* @run testng JapaneseEraNameTest
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR JapaneseEraNameTest
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static java.util.Calendar.*;
|
import static java.util.Calendar.*;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -31,7 +31,7 @@
|
|||||||
* @comment Locale providers: CLDR,SPI
|
* @comment Locale providers: CLDR,SPI
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR,SPI NarrowNamesTest CLDR,SPI
|
* @run main/othervm -Djava.locale.providers=CLDR,SPI NarrowNamesTest CLDR,SPI
|
||||||
* @comment Locale providers: CLDR
|
* @comment Locale providers: CLDR
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR NarrowNamesTest CLDR
|
* @run main NarrowNamesTest CLDR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -58,8 +58,7 @@ import org.junit.jupiter.params.provider.ValueSource;
|
|||||||
* @run junit BasicTestLauncher
|
* @run junit BasicTestLauncher
|
||||||
*/
|
*/
|
||||||
public class BasicTestLauncher {
|
public class BasicTestLauncher {
|
||||||
// Locale flag for testJVM
|
|
||||||
private static final String JAVA_OPTS = "-Djava.locale.providers=CLDR";
|
|
||||||
// Test class
|
// Test class
|
||||||
private static final String TEST_CLASS = "Basic";
|
private static final String TEST_CLASS = "Basic";
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ public class BasicTestLauncher {
|
|||||||
*/
|
*/
|
||||||
private static OutputAnalyzer RunTest(String timeZone) throws IOException{
|
private static OutputAnalyzer RunTest(String timeZone) throws IOException{
|
||||||
// Build and run Basic class with correct configuration
|
// Build and run Basic class with correct configuration
|
||||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(JAVA_OPTS, TEST_CLASS);
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(TEST_CLASS);
|
||||||
pb.environment().put("TZ", timeZone);
|
pb.environment().put("TZ", timeZone);
|
||||||
Process process = pb.start();
|
Process process = pb.start();
|
||||||
return new OutputAnalyzer(process);
|
return new OutputAnalyzer(process);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,7 @@
|
|||||||
* @bug 8179071 8202537 8231273 8251317
|
* @bug 8179071 8202537 8231273 8251317
|
||||||
* @summary Test that language aliases of CLDR supplemental metadata are handled correctly.
|
* @summary Test that language aliases of CLDR supplemental metadata are handled correctly.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run junit/othervm -Djava.locale.providers=CLDR AliasesShouldBeRecognizedInCLDR
|
* @run junit AliasesShouldBeRecognizedInCLDR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -25,7 +25,7 @@
|
|||||||
* @bug 8276186 8174269
|
* @bug 8276186 8174269
|
||||||
* @summary Checks whether getAvailableLocales() returns at least Locale.ROOT and
|
* @summary Checks whether getAvailableLocales() returns at least Locale.ROOT and
|
||||||
* Locale.US instances.
|
* Locale.US instances.
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR RequiredAvailableLocalesTest
|
* @run testng RequiredAvailableLocalesTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* @bug 8215181 8230284 8231273 8284840
|
* @bug 8215181 8230284 8231273 8284840
|
||||||
* @summary Tests the "u-cf" extension
|
* @summary Tests the "u-cf" extension
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR CurrencyFormatTests
|
* @run testng CurrencyFormatTests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -27,7 +27,7 @@
|
|||||||
* @bug 8176841 8202537
|
* @bug 8176841 8202537
|
||||||
* @summary Tests the display names for BCP 47 U extensions
|
* @summary Tests the display names for BCP 47 U extensions
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR DisplayNameTests
|
* @run testng DisplayNameTests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* @summary Tests *Format class deals with Unicode extensions
|
* @summary Tests *Format class deals with Unicode extensions
|
||||||
* correctly.
|
* correctly.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR FormatTests
|
* @run testng FormatTests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -28,7 +28,7 @@
|
|||||||
* @summary Tests *FormatSymbols class deals with Unicode extensions
|
* @summary Tests *FormatSymbols class deals with Unicode extensions
|
||||||
* correctly.
|
* correctly.
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR SymbolsTests
|
* @run testng SymbolsTests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -35,7 +35,7 @@
|
|||||||
* java.base/sun.util.spi
|
* java.base/sun.util.spi
|
||||||
* jdk.localedata
|
* jdk.localedata
|
||||||
* @run main Bug8167143 testTimeZone
|
* @run main Bug8167143 testTimeZone
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR Bug8167143 testCldr
|
* @run main Bug8167143 testCldr
|
||||||
* @run main Bug8167143 testCache
|
* @run main Bug8167143 testCache
|
||||||
* @run main Bug8167143 testCandidateLocales
|
* @run main Bug8167143 testCandidateLocales
|
||||||
*/
|
*/
|
||||||
@ -236,40 +236,40 @@ public class Bug8167143 {
|
|||||||
private static void testImplicitCompatLocales() {
|
private static void testImplicitCompatLocales() {
|
||||||
LocaleProviderAdapter jre = LocaleProviderAdapter.forJRE();
|
LocaleProviderAdapter jre = LocaleProviderAdapter.forJRE();
|
||||||
checkPresenceCompat("BreakIteratorProvider",
|
checkPresenceCompat("BreakIteratorProvider",
|
||||||
jre.getBreakIteratorProvider().getAvailableLocales());
|
jre.getBreakIteratorProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("CollatorProvider",
|
checkPresenceCompat("CollatorProvider",
|
||||||
jre.getCollatorProvider().getAvailableLocales());
|
jre.getCollatorProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("DateFormatProvider",
|
checkPresenceCompat("DateFormatProvider",
|
||||||
jre.getDateFormatProvider().getAvailableLocales());
|
jre.getDateFormatProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("DateFormatSymbolsProvider",
|
checkPresenceCompat("DateFormatSymbolsProvider",
|
||||||
jre.getDateFormatSymbolsProvider().getAvailableLocales());
|
jre.getDateFormatSymbolsProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("DecimalFormatSymbolsProvider",
|
checkPresenceCompat("DecimalFormatSymbolsProvider",
|
||||||
jre.getDecimalFormatSymbolsProvider().getAvailableLocales());
|
jre.getDecimalFormatSymbolsProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("NumberFormatProvider",
|
checkPresenceCompat("NumberFormatProvider",
|
||||||
jre.getNumberFormatProvider().getAvailableLocales());
|
jre.getNumberFormatProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("CurrencyNameProvider",
|
checkPresenceCompat("CurrencyNameProvider",
|
||||||
jre.getCurrencyNameProvider().getAvailableLocales());
|
jre.getCurrencyNameProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("LocaleNameProvider",
|
checkPresenceCompat("LocaleNameProvider",
|
||||||
jre.getLocaleNameProvider().getAvailableLocales());
|
jre.getLocaleNameProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("TimeZoneNameProvider",
|
checkPresenceCompat("TimeZoneNameProvider",
|
||||||
jre.getTimeZoneNameProvider().getAvailableLocales());
|
jre.getTimeZoneNameProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("CalendarDataProvider",
|
checkPresenceCompat("CalendarDataProvider",
|
||||||
jre.getCalendarDataProvider().getAvailableLocales());
|
jre.getCalendarDataProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("CalendarNameProvider",
|
checkPresenceCompat("CalendarNameProvider",
|
||||||
jre.getCalendarNameProvider().getAvailableLocales());
|
jre.getCalendarNameProvider().getAvailableLocales());
|
||||||
checkPresenceCompat("CalendarProvider",
|
checkPresenceCompat("CalendarProvider",
|
||||||
jre.getCalendarProvider().getAvailableLocales());
|
jre.getCalendarProvider().getAvailableLocales());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void checkPresenceCompat(String testName, Locale[] got) {
|
private static void checkPresenceCompat(String testName, Locale[] got) {
|
||||||
List<Locale> gotLocalesList = Arrays.asList(got);
|
List<Locale> gotLocalesList = Arrays.asList(got);
|
||||||
List<Locale> gotList = new ArrayList<>(gotLocalesList);
|
List<Locale> gotList = new ArrayList<>(gotLocalesList);
|
||||||
if (!gotList.removeAll(COMPAT_IMPLICIT_LOCS)) {
|
if (!gotList.removeAll(COMPAT_IMPLICIT_LOCS)) {
|
||||||
// check which Implicit locale are not present in retrievedLocales List.
|
// check which Implicit locale are not present in retrievedLocales List.
|
||||||
List<Locale> implicitLocales = new ArrayList<>(COMPAT_IMPLICIT_LOCS);
|
List<Locale> implicitLocales = new ArrayList<>(COMPAT_IMPLICIT_LOCS);
|
||||||
implicitLocales.removeAll(gotList);
|
implicitLocales.removeAll(gotList);
|
||||||
throw new RuntimeException("Locales those not correctly reflected are "
|
throw new RuntimeException("Locales those not correctly reflected are "
|
||||||
+ implicitLocales + " for test " + testName);
|
+ implicitLocales + " for test " + testName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* @bug 8005471 8008577 8129881 8130845 8136518 8181157 8210490 8220037
|
* @bug 8005471 8008577 8129881 8130845 8136518 8181157 8210490 8220037
|
||||||
* 8234347 8236548 8317979
|
* 8234347 8236548 8317979
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR CLDRDisplayNamesTest
|
* @run main CLDRDisplayNamesTest
|
||||||
* @summary Make sure that localized time zone names of CLDR are used
|
* @summary Make sure that localized time zone names of CLDR are used
|
||||||
* if specified.
|
* if specified.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,7 @@
|
|||||||
* @bug 8275721 8174269
|
* @bug 8275721 8174269
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @summary Checks Chinese time zone names for `UTC` using CLDR are consistent
|
* @summary Checks Chinese time zone names for `UTC` using CLDR are consistent
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR ChineseTimeZoneNameTest
|
* @run testng ChineseTimeZoneNameTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,7 @@
|
|||||||
* @bug 8134250 8134520
|
* @bug 8134250 8134520
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @summary Tests CLDR/LDML features are correctly reflected in JDK.
|
* @summary Tests CLDR/LDML features are correctly reflected in JDK.
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR Bug8134250
|
* @run main Bug8134250
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Note this test highly depends on a particular version of CLDR. Results
|
// Note this test highly depends on a particular version of CLDR. Results
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* @test
|
* @test
|
||||||
* @bug 8134384 8234347 8236548 8347841
|
* @bug 8134384 8234347 8236548 8347841
|
||||||
* @summary Tests CLDR TimeZoneNames has English names for all tzids
|
* @summary Tests CLDR TimeZoneNames has English names for all tzids
|
||||||
* @run main/othervm -Djava.locale.providers=CLDR Bug8134384
|
* @run main Bug8134384
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.text.*;
|
import java.text.*;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* @bug 8145136 8202537 8221432 8251317 8258794 8265315 8306116 8346948
|
* @bug 8145136 8202537 8221432 8251317 8258794 8265315 8306116 8346948
|
||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @summary Tests LikelySubtags is correctly reflected in Locale.getAvailableLocales().
|
* @summary Tests LikelySubtags is correctly reflected in Locale.getAvailableLocales().
|
||||||
* @run junit/othervm -Djava.locale.providers=CLDR LikelySubtagLocalesTest
|
* @run junit LikelySubtagLocalesTest
|
||||||
*/
|
*/
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* @modules jdk.localedata
|
* @modules jdk.localedata
|
||||||
* @summary Checks CLDR time zone names are generated correctly at
|
* @summary Checks CLDR time zone names are generated correctly at
|
||||||
* either build or runtime
|
* either build or runtime
|
||||||
* @run testng/othervm -Djava.locale.providers=CLDR TimeZoneNamesTest
|
* @run testng TimeZoneNamesTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.text.DateFormatSymbols;
|
import java.text.DateFormatSymbols;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user