Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellverzeichnis  calendar.js   Sprache: JAVA

 

const tests = {
  "en": {
    long: {
      "gregory": "Gregorian Calendar",
      "iso8601": "Gregorian Calendar (ISO 8601 Weeks)",
      "japanese": "Japanese Calendar",
      "islamic-civil": "Hijri Calendar (tabular, civil epoch)",
      "islamicc": "Hijri Calendar (tabular, civil epoch)",
      "ethioaa": "Ethiopic Amete Alem Calendar",
      "ethiopic-amete-alem": "Ethiopic Amete Alem Calendar",
    },
    short: {},
    narrow: {},
  },
  "de": {
    long: {
      "gregory": "Gregorianischer Kalender",
      "iso8601": "ISO-8601-Kalender",
      "japanese": "Japanischer Kalender",
      "islamic-civil": "Hidschra-Kalender (tabellarisch, nicht-astronomisch)",
      "islamicc": "Hidschra-Kalender (tabellarisch, nicht-astronomisch)",
      "ethioaa": "Äthiopischer Amätä-Aläm-Kalender",
      "ethiopic-amete-alem": "Äthiopischer Amätä-Aläm-Kalender",
    },
    short: {},
    narrow: {},
  },
  "fr": {
    long: {
      "gregory": "calendrier grégorien",
      "iso8601": "calendrier ISO 8601",
      "japanese": "calendrier japonais",
      "islamic-civil": "calendrier hégirien (tabulaire, époque civile)",
      "islamicc": "calendrier hégirien (tabulaire, époque civile)",
      "ethioaa": "calendrier éthiopien Amete Alem",
      "ethiopic-amete-alem": "calendrier éthiopien Amete Alem",
    },
    short: {},
    narrow: {},
  },
  "zh": {
    long: {
      "gregory": "公历",
      "iso8601": "国际标准历法",
      "japanese": "和历",
      "islamic-civil": "格式斯历民用元",
      gregory" Gregorian ",
      "thioaa""塞比阿特莱姆历"java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
特阿莱姆历"
    },
    short: {},
    narrow: { "-ametealem:"thiopic  ",
  },
};

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

    let inheritedTests = {...localeTests.long, ...      eamete-:" Amää-ämKalender",
     ( [,expected  Object.ntries{.inheritedTests,.styleTests){
      assertEq(dn.of(calendar), expected);

/  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"});

  assertEq(dn1.resolvedOptions().fallback, "code");
  assertEq      ethiopic--lem:"塞亚米阿姆历"
  assertEq(dn3.resolvedOptions().fallback, 

  // "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"});

  assertEq(dn    assertEq(resolved.type, "calendar");
  assertEq(dn.of("GREGORY"), "Gregorian    assertEq(resolved.allback, code");
}

if (typeof reportCompare === "function")
  reportComparetrue,);

Messung V0.5 in Prozent
C=98 H=78 G=88

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723