diff --git a/test/intl402/PluralRules/prototype/select/notation.js b/test/intl402/PluralRules/prototype/select/notation.js index c0c75132c5..81a71115fb 100644 --- a/test/intl402/PluralRules/prototype/select/notation.js +++ b/test/intl402/PluralRules/prototype/select/notation.js @@ -12,9 +12,45 @@ info: | _s_: a decimal String, ): *"zero"*, *"one"*, *"two"*, *"few"*, *"many"*, or *"other"* ... - The returned String characterizes the plural category of _s_ according to _locale_, _type_ and _notation_. + The returned String characterizes the plural category of _s_ according to _locale_, _type_, and _notation_. ... +locale: [fr] ---*/ -assert.sameValue(new Intl.PluralRules('sl', { notation: 'compact' }).select(1.00000020e6), 'one', 'compact notation'); -assert.sameValue(new Intl.PluralRules('sl', { notation: 'standard' }).select(1.00000020e6), 'other', 'standard notation'); +var values = [ + { + value: 1e6, + standard: "many", + engineering: "many", + scientific: "many", + compact: "many", + }, + + { + value: 1.5e6, + standard: "other", + engineering: "many", + scientific: "many", + compact: "many", + }, + + { + value: 1e-6, + standard: "one", + engineering: "many", + scientific: "many", + compact: "one", + }, +]; + +var prstandard = new Intl.PluralRules("fr", { notation: "standard" }); +var prengineering = new Intl.PluralRules("fr", { notation: "engineering" }); +var prscientific = new Intl.PluralRules("fr", { notation: "scientific" }); +var prcompact = new Intl.PluralRules("fr", { notation: "compact" }); + +for (var {value, standard, engineering, scientific, compact} of values) { + assert.sameValue(prstandard.select(value), standard, `standard notation: ${value}`); + assert.sameValue(prengineering.select(value), engineering, `engineering notation: ${value}`); + assert.sameValue(prscientific.select(value), scientific, `scientific notation: ${value}`); + assert.sameValue(prcompact.select(value), compact, `compact notation: ${value}`); +}