changeset 21853:8aa7444a01a8

8028771: regression test java/util/Locale/LocaleProviders.sh failed Reviewed-by: alanb
author naoto
date Wed, 27 Nov 2013 10:01:08 -0800
parents 5059284b03a0
children 3e0f1ef7cccc 0fdb9441797f
files jdk/test/java/util/Locale/LocaleProviders.java jdk/test/java/util/Locale/LocaleProviders.sh
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/util/Locale/LocaleProviders.java	Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.java	Wed Nov 27 10:01:08 2013 -0800
@@ -80,6 +80,12 @@
 
     static void adapterTest(String expected, String lang, String ctry) {
         Locale testLocale = new Locale(lang, ctry);
+        LocaleProviderAdapter ldaExpected =
+            LocaleProviderAdapter.forType(LocaleProviderAdapter.Type.valueOf(expected));
+        if (!ldaExpected.getDateFormatProvider().isSupportedLocale(testLocale)) {
+            System.out.println("test locale: "+testLocale+" is not supported by the expected provider: "+ldaExpected+". Ignoring the test.");
+            return;
+        }
         String preference = System.getProperty("java.locale.providers", "");
         LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale);
         LocaleProviderAdapter.Type type = lda.getAdapterType();
--- a/jdk/test/java/util/Locale/LocaleProviders.sh	Wed Nov 27 09:56:38 2013 +0800
+++ b/jdk/test/java/util/Locale/LocaleProviders.sh	Wed Nov 27 10:01:08 2013 -0800
@@ -24,7 +24,7 @@
 #
 # @test
 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
-#      8013086 8013233 8013903 8015960
+#      8013086 8013233 8013903 8015960 8028771
 # @summary tests for "java.locale.providers" system property
 # @compile -XDignore.symbol.file LocaleProviders.java
 # @run shell/timeout=600 LocaleProviders.sh