ICU-6389 add test for available locales

X-SVN-Rev: 24382
This commit is contained in:
Doug Felt 2008-07-15 02:13:48 +00:00
parent 7c47091e1c
commit 81ee6599da

View File

@ -13,7 +13,10 @@ import com.ibm.icu.util.ULocale;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author dougfelt (Doug Felt)
@ -170,4 +173,12 @@ public class PluralRulesTest extends TestFmwk {
assertTrue("ru listed", available[0]);
assertEquals("ru and ru_RU equivalent locales", ru_ru_equiv, ru_equiv);
}
public void testAvailableULocales() {
ULocale[] locales = PluralRules.getAvailableULocales();
Set localeSet = new HashSet();
localeSet.addAll(Arrays.asList(locales));
assertEquals("locales are unique in list", locales.length, localeSet.size());
}
}