summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Intl/PluralRules
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/Intl/PluralRules')
-rw-r--r--js/src/tests/non262/Intl/PluralRules/browser.js0
-rw-r--r--js/src/tests/non262/Intl/PluralRules/call.js53
-rw-r--r--js/src/tests/non262/Intl/PluralRules/construct-newtarget.js76
-rw-r--r--js/src/tests/non262/Intl/PluralRules/cross-compartment.js22
-rw-r--r--js/src/tests/non262/Intl/PluralRules/negativeZeroFractionDigits.js21
-rw-r--r--js/src/tests/non262/Intl/PluralRules/pluralrules.js18
-rw-r--r--js/src/tests/non262/Intl/PluralRules/resolvedOptions-overridden-species.js25
-rw-r--r--js/src/tests/non262/Intl/PluralRules/rounding.js17
-rw-r--r--js/src/tests/non262/Intl/PluralRules/select.js63
-rw-r--r--js/src/tests/non262/Intl/PluralRules/selectRange.js84
-rw-r--r--js/src/tests/non262/Intl/PluralRules/shell.js0
-rw-r--r--js/src/tests/non262/Intl/PluralRules/supportedLocalesOf.js369
12 files changed, 748 insertions, 0 deletions
diff --git a/js/src/tests/non262/Intl/PluralRules/browser.js b/js/src/tests/non262/Intl/PluralRules/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/browser.js
diff --git a/js/src/tests/non262/Intl/PluralRules/call.js b/js/src/tests/non262/Intl/PluralRules/call.js
new file mode 100644
index 0000000000..9412fa44d0
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/call.js
@@ -0,0 +1,53 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+function IsIntlService(c) {
+ return typeof c === "function" &&
+ c.hasOwnProperty("prototype") &&
+ c.prototype.hasOwnProperty("resolvedOptions");
+}
+
+function thisValues() {
+ const intlConstructors = Object.getOwnPropertyNames(Intl).map(name => Intl[name]).filter(IsIntlService);
+
+ return [
+ // Primitive values.
+ ...[undefined, null, true, "abc", Symbol(), 123],
+
+ // Object values.
+ ...[{}, [], /(?:)/, function(){}, new Proxy({}, {})],
+
+ // Intl objects.
+ ...[].concat(...intlConstructors.map(ctor => {
+ let args = [];
+ if (ctor === Intl.DisplayNames) {
+ // Intl.DisplayNames can't be constructed without any arguments.
+ args = [undefined, {type: "language"}];
+ }
+
+ return [
+ // Instance of an Intl constructor.
+ new ctor(...args),
+
+ // Instance of a subclassed Intl constructor.
+ new class extends ctor {}(...args),
+
+ // Object inheriting from an Intl constructor prototype.
+ Object.create(ctor.prototype),
+
+ // Intl object not inheriting from its default prototype.
+ Object.setPrototypeOf(new ctor(...args), Object.prototype),
+ ];
+ })),
+ ];
+}
+
+// Intl.PluralRules cannot be invoked as a function.
+assertThrowsInstanceOf(() => Intl.PluralRules(), TypeError);
+
+// Also test with explicit this-value.
+for (let thisValue of thisValues()) {
+ assertThrowsInstanceOf(() => Intl.PluralRules.call(thisValue), TypeError);
+}
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);
diff --git a/js/src/tests/non262/Intl/PluralRules/construct-newtarget.js b/js/src/tests/non262/Intl/PluralRules/construct-newtarget.js
new file mode 100644
index 0000000000..356c2dd221
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/construct-newtarget.js
@@ -0,0 +1,76 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+// Test subclassing %Intl.PluralRules% works correctly.
+class MyPluralRules extends Intl.PluralRules {}
+
+var obj = new MyPluralRules();
+assertEq(obj instanceof MyPluralRules, true);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), MyPluralRules.prototype);
+
+obj = Reflect.construct(MyPluralRules, []);
+assertEq(obj instanceof MyPluralRules, true);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), MyPluralRules.prototype);
+
+obj = Reflect.construct(MyPluralRules, [], MyPluralRules);
+assertEq(obj instanceof MyPluralRules, true);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), MyPluralRules.prototype);
+
+obj = Reflect.construct(MyPluralRules, [], Intl.PluralRules);
+assertEq(obj instanceof MyPluralRules, false);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), Intl.PluralRules.prototype);
+
+
+// Set a different constructor as NewTarget.
+obj = Reflect.construct(MyPluralRules, [], Array);
+assertEq(obj instanceof MyPluralRules, false);
+assertEq(obj instanceof Intl.PluralRules, false);
+assertEq(obj instanceof Array, true);
+assertEq(Object.getPrototypeOf(obj), Array.prototype);
+
+obj = Reflect.construct(Intl.PluralRules, [], Array);
+assertEq(obj instanceof Intl.PluralRules, false);
+assertEq(obj instanceof Array, true);
+assertEq(Object.getPrototypeOf(obj), Array.prototype);
+
+
+// The prototype defaults to %PluralRulesPrototype% if null.
+function NewTargetNullPrototype() {}
+NewTargetNullPrototype.prototype = null;
+
+obj = Reflect.construct(Intl.PluralRules, [], NewTargetNullPrototype);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), Intl.PluralRules.prototype);
+
+obj = Reflect.construct(MyPluralRules, [], NewTargetNullPrototype);
+assertEq(obj instanceof MyPluralRules, false);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), Intl.PluralRules.prototype);
+
+
+// "prototype" property is retrieved exactly once.
+var trapLog = [], getLog = [];
+var ProxiedConstructor = new Proxy(Intl.PluralRules, new Proxy({
+ get(target, propertyKey, receiver) {
+ getLog.push(propertyKey);
+ return Reflect.get(target, propertyKey, receiver);
+ }
+}, {
+ get(target, propertyKey, receiver) {
+ trapLog.push(propertyKey);
+ return Reflect.get(target, propertyKey, receiver);
+ }
+}));
+
+obj = Reflect.construct(Intl.PluralRules, [], ProxiedConstructor);
+assertEqArray(trapLog, ["get"]);
+assertEqArray(getLog, ["prototype"]);
+assertEq(obj instanceof Intl.PluralRules, true);
+assertEq(Object.getPrototypeOf(obj), Intl.PluralRules.prototype);
+
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0);
diff --git a/js/src/tests/non262/Intl/PluralRules/cross-compartment.js b/js/src/tests/non262/Intl/PluralRules/cross-compartment.js
new file mode 100644
index 0000000000..ff59f35957
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/cross-compartment.js
@@ -0,0 +1,22 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+var otherGlobal = newGlobal();
+
+var pluralRules = new Intl.PluralRules();
+var ccwPluralRules = new otherGlobal.Intl.PluralRules();
+
+// Test Intl.PluralRules.prototype.select with a CCW object.
+var Intl_PluralRules_select = Intl.PluralRules.prototype.select;
+
+assertEq(Intl_PluralRules_select.call(ccwPluralRules, 0),
+ Intl_PluralRules_select.call(pluralRules, 0));
+
+// Test Intl.PluralRules.prototype.resolvedOptions with a CCW object.
+var Intl_PluralRules_resolvedOptions = Intl.PluralRules.prototype.resolvedOptions;
+
+assertEq(deepEqual(Intl_PluralRules_resolvedOptions.call(ccwPluralRules),
+ Intl_PluralRules_resolvedOptions.call(pluralRules)),
+ true);
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);
diff --git a/js/src/tests/non262/Intl/PluralRules/negativeZeroFractionDigits.js b/js/src/tests/non262/Intl/PluralRules/negativeZeroFractionDigits.js
new file mode 100644
index 0000000000..615e533466
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/negativeZeroFractionDigits.js
@@ -0,0 +1,21 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+const optionsList = [
+ {minimumFractionDigits: -0, maximumFractionDigits: -0},
+ {minimumFractionDigits: -0, maximumFractionDigits: +0},
+ {minimumFractionDigits: +0, maximumFractionDigits: -0},
+ {minimumFractionDigits: +0, maximumFractionDigits: +0},
+];
+
+for (let options of optionsList) {
+ let pluralRules = new Intl.PluralRules("en-US", options);
+
+ let {minimumFractionDigits, maximumFractionDigits} = pluralRules.resolvedOptions();
+ assertEq(minimumFractionDigits, +0);
+ assertEq(maximumFractionDigits, +0);
+
+ assertEq(pluralRules.select(123), "other");
+}
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);
diff --git a/js/src/tests/non262/Intl/PluralRules/pluralrules.js b/js/src/tests/non262/Intl/PluralRules/pluralrules.js
new file mode 100644
index 0000000000..20d6117b3b
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/pluralrules.js
@@ -0,0 +1,18 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+// Tests the format function with a diverse set of locales and options.
+
+var pr;
+
+pr = new Intl.PluralRules("en-us");
+assertEq(pr.resolvedOptions().locale, "en-US");
+assertEq(pr.resolvedOptions().type, "cardinal");
+assertEq(pr.resolvedOptions().pluralCategories.length, 2);
+
+pr = new Intl.PluralRules("de", {type: 'cardinal'});
+assertEq(pr.resolvedOptions().pluralCategories.length, 2);
+
+pr = new Intl.PluralRules("de", {type: 'ordinal'});
+assertEq(pr.resolvedOptions().pluralCategories.length, 1);
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/non262/Intl/PluralRules/resolvedOptions-overridden-species.js b/js/src/tests/non262/Intl/PluralRules/resolvedOptions-overridden-species.js
new file mode 100644
index 0000000000..3591aba32b
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/resolvedOptions-overridden-species.js
@@ -0,0 +1,25 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+// Tests the PluralRules.resolvedOptions function for overriden Array[Symbol.species].
+
+var pl = new Intl.PluralRules("de");
+
+Object.defineProperty(Array, Symbol.species, {
+ value: function() {
+ return new Proxy(["?"], {
+ get(t, pk, r) {
+ return Reflect.get(t, pk, r);
+ },
+ defineProperty(t, pk) {
+ return true;
+ }
+ });
+ }
+});
+
+var pluralCategories = pl.resolvedOptions().pluralCategories;
+
+assertEqArray(pluralCategories, ["one", "other"]);
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0);
diff --git a/js/src/tests/non262/Intl/PluralRules/rounding.js b/js/src/tests/non262/Intl/PluralRules/rounding.js
new file mode 100644
index 0000000000..6f9b5f9936
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/rounding.js
@@ -0,0 +1,17 @@
+// |reftest| skip-if(!this.hasOwnProperty("Intl"))
+
+// The rounding mode defaults to half-up for both NumberFormat and PluralRules.
+
+var locale = "en";
+var options = {maximumFractionDigits: 0};
+
+assertEq(new Intl.NumberFormat(locale, options).format(0), "0");
+assertEq(new Intl.NumberFormat(locale, options).format(0.5), "1");
+assertEq(new Intl.NumberFormat(locale, options).format(1), "1");
+
+assertEq(new Intl.PluralRules(locale, options).select(0), "other");
+assertEq(new Intl.PluralRules(locale, options).select(0.5), "one");
+assertEq(new Intl.PluralRules(locale, options).select(1), "one");
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/non262/Intl/PluralRules/select.js b/js/src/tests/non262/Intl/PluralRules/select.js
new file mode 100644
index 0000000000..dcc057ec3c
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/select.js
@@ -0,0 +1,63 @@
+// |reftest| skip-if(!this.hasOwnProperty('Intl'))
+
+// Tests the format function with a diverse set of locales and options.
+
+var pr;
+
+pr = new Intl.PluralRules("en-us");
+assertEq(pr.select(0), "other");
+assertEq(pr.select(0.5), "other");
+assertEq(pr.select(1.2), "other");
+assertEq(pr.select(1.5), "other");
+assertEq(pr.select(1.7), "other");
+assertEq(pr.select(-1), "one");
+assertEq(pr.select(1), "one");
+assertEq(pr.select("1"), "one");
+assertEq(pr.select(123456789.123456789), "other");
+
+pr = new Intl.PluralRules("de", {type: "cardinal"});
+assertEq(pr.select(0), "other");
+assertEq(pr.select(0.5), "other");
+assertEq(pr.select(1.2), "other");
+assertEq(pr.select(1.5), "other");
+assertEq(pr.select(1.7), "other");
+assertEq(pr.select(-1), "one");
+
+pr = new Intl.PluralRules("de", {type: "ordinal"});
+assertEq(pr.select(0), "other");
+assertEq(pr.select(0.5), "other");
+assertEq(pr.select(1.2), "other");
+assertEq(pr.select(1.5), "other");
+assertEq(pr.select(1.7), "other");
+assertEq(pr.select(-1), "other");
+
+pr = new Intl.PluralRules("pl", {type: "cardinal"});
+assertEq(pr.select(0), "many");
+assertEq(pr.select(0.5), "other");
+assertEq(pr.select(1), "one");
+
+pr = new Intl.PluralRules("pl", {type: "cardinal", maximumFractionDigits: 0});
+assertEq(pr.select(1.1), "one");
+
+pr = new Intl.PluralRules("pl", {type: "cardinal", maximumFractionDigits: 1});
+assertEq(pr.select(1.1), "other");
+
+pr = new Intl.PluralRules("en", {type: "cardinal", minimumFractionDigits: 0});
+assertEq(pr.select(1), "one");
+
+pr = new Intl.PluralRules("en", {type: "cardinal", minimumFractionDigits: 2});
+assertEq(pr.select(1), "other");
+
+var weirdCases = [
+ NaN,
+ Infinity,
+ "word",
+ [0,2],
+ {},
+];
+
+for (let c of weirdCases) {
+ assertEq(pr.select(c), "other");
+};
+
+reportCompare(0, 0, 'ok');
diff --git a/js/src/tests/non262/Intl/PluralRules/selectRange.js b/js/src/tests/non262/Intl/PluralRules/selectRange.js
new file mode 100644
index 0000000000..59faf621e2
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/selectRange.js
@@ -0,0 +1,84 @@
+// |reftest| skip-if(!this.hasOwnProperty('Intl')||release_or_beta)
+
+// Any combination returns "other" for "en-US".
+{
+ let numbers = [0, 0.5, 1.2, 1.5, 1.7, -1, 1, "1", 123456789.123456789, Infinity, -Infinity];
+
+ const weirdCases = [
+ NaN,
+ "word",
+ [0, 2],
+ {},
+ ];
+
+ for (let type of ["ordinal", "cardinal"]) {
+ let pr = new Intl.PluralRules("en-US", {type});
+ for (let start of numbers) {
+ for (let end of numbers) {
+ assertEq(pr.selectRange(start, end), "other");
+ }
+ }
+
+ for (let c of weirdCases) {
+ assertThrowsInstanceOf(() => pr.selectRange(c, 0), RangeError);
+ assertThrowsInstanceOf(() => pr.selectRange(0, c), RangeError);
+ assertThrowsInstanceOf(() => pr.selectRange(c, c), RangeError);
+ }
+ }
+}
+
+// fr (French) returns different results.
+{
+ let ordinal = new Intl.PluralRules("fr", {type: "ordinal"});
+ let cardinal = new Intl.PluralRules("fr", {type: "cardinal"});
+
+ assertEq(ordinal.selectRange(1, 1), "one");
+ assertEq(ordinal.selectRange(0, 1), "other");
+
+ assertEq(cardinal.selectRange(1, 1), "one");
+ assertEq(cardinal.selectRange(0, 1), "one");
+}
+
+// cy (Cymraeg) can return any combination.
+{
+ let ordinal = new Intl.PluralRules("cy", {type: "ordinal"});
+
+ assertEq(ordinal.selectRange(0, 0), "other");
+ assertEq(ordinal.selectRange(0, 1), "one");
+ assertEq(ordinal.selectRange(0, 2), "two");
+ assertEq(ordinal.selectRange(0, 3), "few");
+ assertEq(ordinal.selectRange(0, 5), "many");
+ assertEq(ordinal.selectRange(0, 10), "other");
+
+ assertEq(ordinal.selectRange(1, 1), "other");
+ assertEq(ordinal.selectRange(1, 2), "two");
+ assertEq(ordinal.selectRange(1, 3), "few");
+ assertEq(ordinal.selectRange(1, 5), "many");
+ assertEq(ordinal.selectRange(1, 10), "other");
+
+ assertEq(ordinal.selectRange(2, 2), "other");
+ assertEq(ordinal.selectRange(2, 3), "few");
+ assertEq(ordinal.selectRange(2, 5), "many");
+ assertEq(ordinal.selectRange(2, 10), "other");
+
+ assertEq(ordinal.selectRange(3, 3), "other");
+ assertEq(ordinal.selectRange(3, 5), "many");
+ assertEq(ordinal.selectRange(3, 10), "other");
+
+ assertEq(ordinal.selectRange(5, 5), "other");
+ assertEq(ordinal.selectRange(5, 10), "other");
+
+ assertEq(ordinal.selectRange(10, 10), "other");
+}
+
+// BigInt inputs aren't allowed.
+{
+ let pr = new Intl.PluralRules("en-US");
+
+ assertThrowsInstanceOf(() => pr.selectRange(0, 0n), TypeError);
+ assertThrowsInstanceOf(() => pr.selectRange(0n, 0), TypeError);
+ assertThrowsInstanceOf(() => pr.selectRange(0n, 0n), TypeError);
+}
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);
diff --git a/js/src/tests/non262/Intl/PluralRules/shell.js b/js/src/tests/non262/Intl/PluralRules/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/shell.js
diff --git a/js/src/tests/non262/Intl/PluralRules/supportedLocalesOf.js b/js/src/tests/non262/Intl/PluralRules/supportedLocalesOf.js
new file mode 100644
index 0000000000..7c6ebe8c45
--- /dev/null
+++ b/js/src/tests/non262/Intl/PluralRules/supportedLocalesOf.js
@@ -0,0 +1,369 @@
+// |reftest| skip-if(!this.hasOwnProperty('Intl')||xulRuntime.shell)
+// -- test in browser only that ICU has locale data for all Mozilla languages
+
+// This array contains the locales that ICU supports in
+// number formatting whose languages Mozilla localizes Firefox into.
+// Current as of ICU 50.1.2 and Firefox March 2013.
+var locales = [
+ "af",
+ "af-NA",
+ "af-ZA",
+ "ar",
+ "ar-001",
+ "ar-AE",
+ "ar-BH",
+ "ar-DJ",
+ "ar-DZ",
+ "ar-EG",
+ "ar-EH",
+ "ar-ER",
+ "ar-IL",
+ "ar-IQ",
+ "ar-JO",
+ "ar-KM",
+ "ar-KW",
+ "ar-LB",
+ "ar-LY",
+ "ar-MA",
+ "ar-MR",
+ "ar-OM",
+ "ar-PS",
+ "ar-QA",
+ "ar-SA",
+ "ar-SD",
+ "ar-SO",
+ "ar-SY",
+ "ar-TD",
+ "ar-TN",
+ "ar-YE",
+ "as",
+ "as-IN",
+ "be",
+ "be-BY",
+ "bg",
+ "bg-BG",
+ "bn",
+ "bn-BD",
+ "bn-IN",
+ "br",
+ "br-FR",
+ "bs",
+ "bs-Cyrl",
+ "bs-Cyrl-BA",
+ "bs-Latn",
+ "bs-Latn-BA",
+ "ca",
+ "ca-AD",
+ "ca-ES",
+ "cs",
+ "cs-CZ",
+ "cy",
+ "cy-GB",
+ "da",
+ "da-DK",
+ "de",
+ "de-AT",
+ "de-BE",
+ "de-CH",
+ "de-DE",
+ "de-LI",
+ "de-LU",
+ "el",
+ "el-CY",
+ "el-GR",
+ "en",
+ "en-150",
+ "en-AG",
+ "en-AS",
+ "en-AU",
+ "en-BB",
+ "en-BE",
+ "en-BM",
+ "en-BS",
+ "en-BW",
+ "en-BZ",
+ "en-CA",
+ "en-CM",
+ "en-DM",
+ "en-FJ",
+ "en-FM",
+ "en-GB",
+ "en-GD",
+ "en-GG",
+ "en-GH",
+ "en-GI",
+ "en-GM",
+ "en-GU",
+ "en-GY",
+ "en-HK",
+ "en-IE",
+ "en-IM",
+ "en-IN",
+ "en-JE",
+ "en-JM",
+ "en-KE",
+ "en-KI",
+ "en-KN",
+ "en-KY",
+ "en-LC",
+ "en-LR",
+ "en-LS",
+ "en-MG",
+ "en-MH",
+ "en-MP",
+ "en-MT",
+ "en-MU",
+ "en-MW",
+ "en-NA",
+ "en-NG",
+ "en-NZ",
+ "en-PG",
+ "en-PH",
+ "en-PK",
+ "en-PR",
+ "en-PW",
+ "en-SB",
+ "en-SC",
+ "en-SG",
+ "en-SL",
+ "en-SS",
+ "en-SZ",
+ "en-TC",
+ "en-TO",
+ "en-TT",
+ "en-TZ",
+ "en-UG",
+ "en-UM",
+ "en-US",
+ "en-US-posix",
+ "en-VC",
+ "en-VG",
+ "en-VI",
+ "en-VU",
+ "en-WS",
+ "en-ZA",
+ "en-ZM",
+ "en-ZW",
+ "eo",
+ "es",
+ "es-419",
+ "es-AR",
+ "es-BO",
+ "es-CL",
+ "es-CO",
+ "es-CR",
+ "es-CU",
+ "es-DO",
+ "es-EA",
+ "es-EC",
+ "es-ES",
+ "es-GQ",
+ "es-GT",
+ "es-HN",
+ "es-IC",
+ "es-MX",
+ "es-NI",
+ "es-PA",
+ "es-PE",
+ "es-PH",
+ "es-PR",
+ "es-PY",
+ "es-SV",
+ "es-US",
+ "es-UY",
+ "es-VE",
+ "et",
+ "et-EE",
+ "eu",
+ "eu-ES",
+ "fa",
+ "fa-AF",
+ "fa-IR",
+ "ff",
+ "ff-SN",
+ "fi",
+ "fi-FI",
+ "fr",
+ "fr-BE",
+ "fr-BF",
+ "fr-BI",
+ "fr-BJ",
+ "fr-BL",
+ "fr-CA",
+ "fr-CD",
+ "fr-CF",
+ "fr-CG",
+ "fr-CH",
+ "fr-CI",
+ "fr-CM",
+ "fr-DJ",
+ "fr-DZ",
+ "fr-FR",
+ "fr-GA",
+ "fr-GF",
+ "fr-GN",
+ "fr-GP",
+ "fr-GQ",
+ "fr-HT",
+ "fr-KM",
+ "fr-LU",
+ "fr-MA",
+ "fr-MC",
+ "fr-MF",
+ "fr-MG",
+ "fr-ML",
+ "fr-MQ",
+ "fr-MR",
+ "fr-MU",
+ "fr-NC",
+ "fr-NE",
+ "fr-PF",
+ "fr-RE",
+ "fr-RW",
+ "fr-SC",
+ "fr-SN",
+ "fr-SY",
+ "fr-TD",
+ "fr-TG",
+ "fr-TN",
+ "fr-VU",
+ "fr-YT",
+ "ga",
+ "ga-IE",
+ "gl",
+ "gl-ES",
+ "gu",
+ "gu-IN",
+ "he",
+ "he-IL",
+ "hi",
+ "hi-IN",
+ "hr",
+ "hr-BA",
+ "hr-HR",
+ "hu",
+ "hu-HU",
+ "hy",
+ "hy-AM",
+ "id",
+ "id-ID",
+ "is",
+ "is-IS",
+ "it",
+ "it-CH",
+ "it-IT",
+ "it-SM",
+ "ja",
+ "ja-JP",
+ "kk",
+ "kk-Cyrl",
+ "kk-Cyrl-KZ",
+ "km",
+ "km-KH",
+ "kn",
+ "kn-IN",
+ "ko",
+ "ko-KP",
+ "ko-KR",
+ "lt",
+ "lt-LT",
+ "lv",
+ "lv-LV",
+ "mk",
+ "mk-MK",
+ "ml",
+ "ml-IN",
+ "mr",
+ "mr-IN",
+ "nb",
+ "nb-NO",
+ "nl",
+ "nl-AW",
+ "nl-BE",
+ "nl-CW",
+ "nl-NL",
+ "nl-SR",
+ "nl-SX",
+ "nn",
+ "nn-NO",
+ "or",
+ "or-IN",
+ "pa",
+ "pa-Arab",
+ "pa-Arab-PK",
+ "pa-Guru",
+ "pa-Guru-IN",
+ "pl",
+ "pl-PL",
+ "pt",
+ "pt-AO",
+ "pt-BR",
+ "pt-CV",
+ "pt-GW",
+ "pt-MO",
+ "pt-MZ",
+ "pt-PT",
+ "pt-ST",
+ "pt-TL",
+ "rm",
+ "rm-CH",
+ "ro",
+ "ro-MD",
+ "ro-RO",
+ "ru",
+ "ru-BY",
+ "ru-KG",
+ "ru-KZ",
+ "ru-MD",
+ "ru-RU",
+ "ru-UA",
+ "si",
+ "si-LK",
+ "sk",
+ "sk-SK",
+ "sl",
+ "sl-SI",
+ "sq",
+ "sq-AL",
+ "sq-MK",
+ "sr",
+ "sr-Cyrl",
+ "sr-Cyrl-BA",
+ "sr-Cyrl-ME",
+ "sr-Cyrl-RS",
+ "sr-Latn",
+ "sr-Latn-BA",
+ "sr-Latn-ME",
+ "sr-Latn-RS",
+ "sv",
+ "sv-AX",
+ "sv-FI",
+ "sv-SE",
+ "te",
+ "te-IN",
+ "th",
+ "th-TH",
+ "tr",
+ "tr-CY",
+ "tr-TR",
+ "uk",
+ "uk-UA",
+ "vi",
+ "vi-VN",
+ "zh",
+ "zh-Hans",
+ "zh-Hans-CN",
+ "zh-Hans-HK",
+ "zh-Hans-MO",
+ "zh-Hans-SG",
+ "zh-Hant",
+ "zh-Hant-HK",
+ "zh-Hant-MO",
+ "zh-Hant-TW",
+];
+
+const result = Intl.PluralRules.supportedLocalesOf(locales);
+
+assertEqArray(locales, result);
+
+reportCompare(0, 0, 'ok');