use of com.github.anba.es6draft.runtime.Realm in project es6draft by anba.
the class DefaultLocaleTimezone method testEtc_GMTWithHourOffset.
@Test
public void testEtc_GMTWithHourOffset() throws Exception {
Realm realm = newRealm(TimeZone.getTimeZone("Etc/GMT-8"));
assertEquals("Etc/GMT-8", resolvedTimeZone(realm));
}
use of com.github.anba.es6draft.runtime.Realm in project es6draft by anba.
the class DefaultLocaleTimezone method testEtc_UCT.
@Test
public void testEtc_UCT() throws Exception {
Realm realm = newRealm(TimeZone.getTimeZone("Etc/UCT"));
assertEquals("UTC", resolvedTimeZone(realm));
}
use of com.github.anba.es6draft.runtime.Realm in project es6draft by anba.
the class DefaultLocaleTimezone method testJapan.
@Test
public void testJapan() throws Exception {
Realm realm = newRealm(TimeZone.getTimeZone("Japan"));
assertEquals("Asia/Tokyo", resolvedTimeZone(realm));
}
use of com.github.anba.es6draft.runtime.Realm in project es6draft by anba.
the class DefaultLocaleTimezone method testGMT0.
@Test
public void testGMT0() throws Exception {
Realm realm = newRealm(TimeZone.getTimeZone("GMT0"));
assertEquals("UTC", resolvedTimeZone(realm));
}
use of com.github.anba.es6draft.runtime.Realm in project es6draft by anba.
the class DefaultLocaleTimezone method testInvalidLocale.
@Test
public void testInvalidLocale() throws Exception {
Realm realm = newRealm(new Locale("invalid"));
assertEquals("en", resolvedLocale(realm, Intl.Collator));
assertEquals("en", resolvedLocale(realm, Intl.DateTimeFormat));
assertEquals("en", resolvedLocale(realm, Intl.NumberFormat));
}
Aggregations