use of libcore.icu.LocaleData in project robolectric by robolectric.
the class ShadowLocaleDataTest method shouldSupportLocaleEn_US_perMillPostP.
@Test
@Config(minSdk = Build.VERSION_CODES.P)
public void shouldSupportLocaleEn_US_perMillPostP() {
LocaleData localeData = LocaleData.get(Locale.US);
assertThat(localeData.perMill).isEqualTo("‰");
}
use of libcore.icu.LocaleData in project robolectric by robolectric.
the class ShadowLocaleDataTest method shouldSupportLocaleEn_US_since_jelly_bean_mr1.
@Test
@Config(minSdk = JELLY_BEAN_MR1)
public void shouldSupportLocaleEn_US_since_jelly_bean_mr1() throws NoSuchFieldException, IllegalAccessException {
LocaleData localeData = LocaleData.get(Locale.US);
assertThat(localeData.tinyMonthNames).isEqualTo(new String[] { "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D" });
assertThat(localeData.tinyStandAloneMonthNames).isEqualTo(localeData.tinyMonthNames);
assertThat(localeData.tinyWeekdayNames).isEqualTo(new String[] { "", "S", "M", "T", "W", "T", "F", "S" });
assertThat(localeData.tinyStandAloneWeekdayNames).isEqualTo(localeData.tinyWeekdayNames);
if (getApiLevel() <= R) {
assertThat((String) ReflectionHelpers.getField(localeData, "yesterday")).isEqualTo("Yesterday");
}
assertThat(localeData.today).isEqualTo("Today");
assertThat(localeData.tomorrow).isEqualTo("Tomorrow");
}
use of libcore.icu.LocaleData in project robolectric by robolectric.
the class ShadowLocaleDataTest method shouldSupportLocaleEn_US_perMill.
@Test
@Config(maxSdk = Build.VERSION_CODES.O)
public void shouldSupportLocaleEn_US_perMill() {
LocaleData localeData = LocaleData.get(Locale.US);
char perMillValue = ReflectionHelpers.getField(localeData, "perMill");
assertThat(perMillValue).isEqualTo('‰');
}
Aggregations