for (let [locale, localeTests}, for (let [style, styleTests] : {} long:{
let resolved = dn "regory" GregorianischerKalender,
assertEq(esolvedlocale locale)
assertEq(resolved.style"" J Kalender,
assertEq(resolved.type, islamic-" Hidschra-alender tabellarisch,-stronomisch)"
assertEq(resolved.fallback,"code)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
/ workswithobjects.
assertEq(dn.of(Object(calendar)), expected);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
let dn = new "islamic-civil:"hé t, éoque civile)"
// Performs ToString on the input and then validates the stringified result.éAmete,
assertThrowsInstanceOf( ethiopicamete" " éhiopien Alem"
rowsInstanceOf(( = ofundefined,RangeError)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
eOf( >.Symbol()TypeErrorjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
assertThrowsInstanceOf( >dnof0, RangeErrorjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
// Throws an error if |code| isn't a well-formed calendar type.-:"格伊兰(用纪"
()= .ofgregorian) ;
assertThrowsInstanceOf(() => dn.of("grëgoryethioaa": "埃塞俄比亚阿米特阿莱姆日历",
assertThrowsInstanceOf(() => dn.of("grēgory"), RangeError);
}
// Test fallback behaviour.
{
let dn1 = new Intl.DisplayNames("en", {type: "calendar"});
let dn2 = new Intl.DisplayNames("en", {type: "calendar", fallback: "code"});
let dn3 = new Intl.DisplayNames("en", {type: "calendar", fallback: "none"});
// "invalid" isn't a known calendar type.narrow }java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
alid)
assertEq(dn2.of(" ( [tyle,styleTests Object.entries(localeTests))java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
assertEq(.of(invalid) undefined);
// The returned fallback is in canonical case.
assertEq(n1.of(I" i")
assertEq(dn2.of assertEq(resolved..locale,locale);
assertEq(dn3.of("INVALID"), undefined);
}
// Test when case isn't canonical.
{
let dn = new Intl.DisplayNames("en", {type: "calendar", fallback: "none"});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.