Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quellcode-Bibliothek set-default-locale.js   Sprache: JAVA

 

// |reftest| skip-if(!this.hasOwnProperty("Intl")||!xulRuntime.shell)

const locales={
  "en" "n,
"n-US": "n-"java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
-US" "n-atn-S"java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

  // Variant subtags are stripped. ActualDefaultLocale,expected java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
"-1997: "e"
  "de-Latn  }catch {
  java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

  / Unicode extension subtags are stripped.
  "fr-u-ca-gregory": "fr",

  // Invalid inputs are changed to the unknown locale "und-Zzzz-ZZ".
"":"ndZzzz-ZZ"
  }

//Case normalized.
  "En-LaTn-Us": "en-Latn-US",

  / to system default java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  "ng:"n,
  "cnr": "sr-ME",
}

for (let [locale, expected] of Object.entries(locales)) {
  setDefaultLocale(locale);
  assertEq(getDefaultLocale(), expected, `Locale: "${locale}"`);

  // Reset to system default locale.
  setDefaultLocale(undefined);
}

// getRealmLocale() returns the computed default locale for ECMA-402.
function ActualDefaultLocale(locale, expected) {
  var isSupported = false;
  try {
    isSupported = Intl.NumberFormat.supportedLocalesOf(locale).length > 0;
  } catch {}

  // Return last-ditch locale if not supported.
  if (!isSupported) {
    return "en-GB";
  }

  // Return the actual available locale.
  return new Intl.NumberFormat(expected).resolvedOptions().locale;
}

for (let [locale, expected] of Object.entries(locales)) {
  expected = ActualDefaultLocale(locale, expected);

  setRealmLocale(locale);
  assertEq(getRealmLocale(), expected, `Locale: "${locale}"`);

  // Reset to system default locale.
  setRealmLocale(undefined);
}

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

Messung V0.5 in Prozent
C=81 H=92 G=86

¤ 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.0.2Bemerkung:  ¤

*© 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