use of libcore.icu.LocaleData in project robolectric by robolectric.
the class ShadowLocaleDataTest method shouldSupportLocaleEn_US_percentPost22.
@Test
@Config(minSdk = LOLLIPOP_MR1)
public void shouldSupportLocaleEn_US_percentPost22() {
LocaleData localeData = LocaleData.get(Locale.US);
assertThat(localeData.percent).isEqualTo("%");
}
use of libcore.icu.LocaleData in project robolectric by robolectric.
the class ShadowLocaleDataTest method shouldDefaultToTheDefaultLocale.
@Test
public void shouldDefaultToTheDefaultLocale() {
Locale.setDefault(Locale.US);
LocaleData localeData = LocaleData.get(null);
assertThat(localeData.amPm).isEqualTo(new String[] { "AM", "PM" });
}
use of libcore.icu.LocaleData in project j2objc by google.
the class LocaleDataTest method test_en_US.
public void test_en_US() throws Exception {
LocaleData l = LocaleData.get(Locale.US);
assertEquals("AM", l.amPm[0]);
// narrowAm not available in J2ObjC.
// assertEquals("a", l.narrowAm);
assertEquals("BC", l.eras[0]);
assertEquals("January", l.longMonthNames[0]);
assertEquals("Jan", l.shortMonthNames[0]);
assertEquals("J", l.tinyMonthNames[0]);
assertEquals("January", l.longStandAloneMonthNames[0]);
assertEquals("Jan", l.shortStandAloneMonthNames[0]);
assertEquals("J", l.tinyStandAloneMonthNames[0]);
assertEquals("Sunday", l.longWeekdayNames[1]);
assertEquals("Sun", l.shortWeekdayNames[1]);
assertEquals("S", l.tinyWeekdayNames[1]);
assertEquals("Sunday", l.longStandAloneWeekdayNames[1]);
assertEquals("Sun", l.shortStandAloneWeekdayNames[1]);
assertEquals("S", l.tinyStandAloneWeekdayNames[1]);
assertEquals("Yesterday", l.yesterday);
assertEquals("Today", l.today);
assertEquals("Tomorrow", l.tomorrow);
}
use of libcore.icu.LocaleData in project j2objc by google.
the class LocaleDataTest method test_ko_KR.
public void test_ko_KR() throws Exception {
LocaleData l = LocaleData.get(new Locale("ko", "KR"));
// Ensure the fix for http://b/14493853 doesn't mangle Hangul.
assertEquals("어제", l.yesterday);
assertEquals("오늘", l.today);
assertEquals("내일", l.tomorrow);
}
use of libcore.icu.LocaleData in project j2objc by google.
the class LocaleDataTest method test_de_DE.
public void test_de_DE() throws Exception {
LocaleData l = LocaleData.get(new Locale("de", "DE"));
assertEquals("Gestern", l.yesterday);
assertEquals("Heute", l.today);
assertEquals("Morgen", l.tomorrow);
}
Aggregations