mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-11755 Excluded a couple of locales (ROOT and de_GR) from locale SPI test. __ICU4J does not make much sense, and de_GR is not supported by ICU4J.
X-SVN-Rev: 37990
This commit is contained in:
parent
9a3c2ba437
commit
e3222a5716
10 changed files with 42 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ public class BreakIteratorTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : BreakIterator.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -24,7 +24,7 @@ public class CollatorTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : Collator.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@ public class CurrencyNameTest extends TestFmwk {
|
|||
String currencyCode = currency.getCurrencyCode();
|
||||
com.ibm.icu.util.Currency currencyIcu = com.ibm.icu.util.Currency.getInstance(currencyCode);
|
||||
for (Locale loc : Locale.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class CurrencyNameTest extends TestFmwk {
|
|||
String currencyCode = currency.getCurrencyCode();
|
||||
com.ibm.icu.util.Currency currencyIcu = com.ibm.icu.util.Currency.getInstance(currencyCode);
|
||||
for (Locale loc : Locale.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@ public class DateFormatSymbolsTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : DateFormatSymbols.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -27,7 +27,7 @@ public class DateFormatTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : DateFormat.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2014, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ public class DecimalFormatSymbolsTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : DecimalFormatSymbols.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@ public class LocaleNameTest extends TestFmwk {
|
|||
Locale[] locales = Locale.getAvailableLocales();
|
||||
StringBuffer icuid = new StringBuffer();
|
||||
for (Locale inLocale : locales) {
|
||||
if (TestUtil.isProblematicIBMLocale(inLocale)) {
|
||||
if (TestUtil.isExcluded(inLocale)) {
|
||||
logln("Skipped " + inLocale);
|
||||
continue;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class LocaleNameTest extends TestFmwk {
|
|||
|
||||
Locale[] locales = Locale.getAvailableLocales();
|
||||
for (Locale inLocale : locales) {
|
||||
if (TestUtil.isProblematicIBMLocale(inLocale)) {
|
||||
if (TestUtil.isExcluded(inLocale)) {
|
||||
logln("Skipped " + inLocale);
|
||||
continue;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class LocaleNameTest extends TestFmwk {
|
|||
public void TestCountryNames() {
|
||||
Locale[] locales = Locale.getAvailableLocales();
|
||||
for (Locale inLocale : locales) {
|
||||
if (TestUtil.isProblematicIBMLocale(inLocale)) {
|
||||
if (TestUtil.isExcluded(inLocale)) {
|
||||
logln("Skipped " + inLocale);
|
||||
continue;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class LocaleNameTest extends TestFmwk {
|
|||
}
|
||||
|
||||
for (Locale inLocale : locales) {
|
||||
if (TestUtil.isProblematicIBMLocale(inLocale)) {
|
||||
if (TestUtil.isExcluded(inLocale)) {
|
||||
logln("Skipped " + inLocale);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ public class NumberFormatTest extends TestFmwk {
|
|||
*/
|
||||
public void TestGetInstance() {
|
||||
for (Locale loc : NumberFormat.getAvailableLocales()) {
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
logln("Skipped " + loc);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
package com.ibm.icu.dev.test.localespi;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
import com.ibm.icu.util.ULocale;
|
||||
import com.ibm.icu.util.ULocale.Builder;
|
||||
|
@ -95,6 +97,23 @@ public class TestUtil {
|
|||
return IBMJRE;
|
||||
}
|
||||
|
||||
private static final Set<Locale> EXCLUDED_LOCALES = new HashSet<Locale>();
|
||||
static {
|
||||
EXCLUDED_LOCALES.add(Locale.ROOT);
|
||||
// de-GR is supported by Java 8, but not supported by CLDR / ICU
|
||||
EXCLUDED_LOCALES.add(new Locale("de", "GR"));
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if the given locale is excluded from locale SPI test
|
||||
*/
|
||||
public static boolean isExcluded(Locale loc) {
|
||||
if (EXCLUDED_LOCALES.contains(loc)) {
|
||||
return true;
|
||||
}
|
||||
return isProblematicIBMLocale(loc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ticket#6368
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2008-2014, International Business Machines Corporation and *
|
||||
* Copyright (C) 2008-2015, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ public class TimeZoneNameTest extends TestFmwk {
|
|||
|
||||
for (Locale loc : locales) {
|
||||
boolean warningOnly = false;
|
||||
if (TestUtil.isProblematicIBMLocale(loc)) {
|
||||
if (TestUtil.isExcluded(loc)) {
|
||||
warningOnly = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue