Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/tests/test262/intl402/PluralRules/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  notation.js   Sprache: JAVA

 

// Copyright 2025 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-intl.pluralrules
description: Checks that the notation option is picked up correctly.
info: |
  Intl.PluralRules ( [ _locales_ [ , _options_ ] ] )
    ...
    1. Let notation be ? GetOption(options, "notation", "string", « "standard", "compact", "scientific", "engineering" », "standard").
    ...
---*/


const validValues = ["standard", "compact", "scientific", "engineering"];
const invalidValues = ["COMPACT", "ståndard", 123, false, null, {}, [], ""];

for (const value of validValues) {
  const pr = new Intl.PluralRules("en", { notation: value });
  assert(pr.resolvedOptions().notation === value, `Resolved options should have notation ${value}`);
}

// Also test with String wrappers.
for (const value of validValues) {
  const pr = new Intl.PluralRules("en", { notation: new String(value) });
  assert(pr.resolvedOptions().notation === value, `Resolved options should have notation ${value}`);
}

for (const value of invalidValues) {
  assert.throws(RangeError, () => {
    new Intl.PluralRules("en", { notation: value });
  }, `Exception should be thrown for ${value}`);
}

assert.throws(TypeError, () => {
  new Intl.PluralRules("en", { notation: Symbol("foo") });
}, `Exception should be thrown for symbol`);

reportCompare(0, 0);

Messung V0.5 in Prozent
C=90 H=44 G=70

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-09-30) ¤

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