diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java b/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java index eec87755dc..4864a72147 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java @@ -6,6 +6,9 @@ package org.mozilla.javascript; +import java.text.NumberFormat; +import java.util.IllformedLocaleException; +import java.util.Locale; import org.mozilla.javascript.dtoa.DecimalFormatter; /** @@ -98,8 +101,8 @@ static void init(Scriptable scope, boolean sealed) { } constructor.definePrototypeMethod(scope, "toString", 1, NativeNumber::js_toString); - // Alias toLocaleString to toString - constructor.definePrototypeMethod(scope, "toLocaleString", 0, NativeNumber::js_toString); + constructor.definePrototypeMethod( + scope, "toLocaleString", 0, NativeNumber::js_toLocaleString); constructor.definePrototypeMethod(scope, "toSource", 0, NativeNumber::js_toSource); constructor.definePrototypeMethod(scope, "valueOf", 0, NativeNumber::js_valueOf); constructor.definePrototypeMethod(scope, "toFixed", 1, NativeNumber::js_toFixed); @@ -225,6 +228,25 @@ private static Object js_toString( return ScriptRuntime.numberToString(toSelf(thisObj).doubleValue, base); } + private static Object js_toLocaleString( + Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { + if (!cx.hasFeature(Context.FEATURE_INTL_402)) { + return js_toString(cx, scope, thisObj, ScriptRuntime.emptyArgs); + } + + if (args.length != 0 && args[0] instanceof String) { + final String localeStr = (String) args[0]; + try { + final Locale locale = new Locale.Builder().setLanguageTag(localeStr).build(); + return NumberFormat.getInstance(locale).format(toSelf(thisObj).doubleValue); + } catch (final IllformedLocaleException e) { + throw ScriptRuntime.rangeError("Invalid language tag: " + localeStr); + } + } + + return NumberFormat.getInstance(cx.getLocale()).format(toSelf(thisObj).doubleValue); + } + private static Object js_toSource( Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { return "(new Number(" + ScriptRuntime.toString(toSelf(thisObj).doubleValue) + "))"; diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeString.java b/rhino/src/main/java/org/mozilla/javascript/NativeString.java index 90a8b9a9d7..496a36aa67 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeString.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeString.java @@ -13,6 +13,7 @@ import java.text.Normalizer; import java.util.ArrayList; import java.util.HashMap; +import java.util.IllformedLocaleException; import java.util.List; import java.util.Locale; import java.util.Map; @@ -1115,7 +1116,11 @@ private static Object js_toLocaleLowerCase( Locale locale = cx.getLocale(); if (args.length > 0 && cx.hasFeature(Context.FEATURE_INTL_402)) { String lang = ScriptRuntime.toString(args[0]); - locale = new Locale(lang); + try { + locale = new Locale.Builder().setLanguageTag(lang).build(); + } catch (final IllformedLocaleException e) { + // ignore and fall back to the context locale + } } return thisStr.toLowerCase(locale); } @@ -1128,7 +1133,11 @@ private static Object js_toLocaleUpperCase( Locale locale = cx.getLocale(); if (args.length > 0 && cx.hasFeature(Context.FEATURE_INTL_402)) { String lang = ScriptRuntime.toString(args[0]); - locale = new Locale(lang); + try { + locale = new Locale.Builder().setLanguageTag(lang).build(); + } catch (final IllformedLocaleException e) { + // ignore and fall back to the context locale + } } return thisStr.toUpperCase(locale); } diff --git a/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java b/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java index 1703d417d9..e817550ae2 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java @@ -85,7 +85,16 @@ public class Test262SuiteTest { static final Map HARNESS_SCRIPT_CACHE = new ConcurrentHashMap<>(); static final Map RESULT_TRACKERS = new LinkedHashMap<>(); - static ShellContextFactory CTX_FACTORY = new ShellContextFactory(); + static ShellContextFactory CTX_FACTORY = + new ShellContextFactory() { + protected boolean hasFeature(Context cx, int featureIndex) { + if (Context.FEATURE_INTL_402 == featureIndex) { + return true; + } + + return super.hasFeature(cx, featureIndex); + } + }; static final Set UNSUPPORTED_FEATURES = new HashSet<>( diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeNumber2Test.java b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeNumber2Test.java new file mode 100644 index 0000000000..70078c6fee --- /dev/null +++ b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeNumber2Test.java @@ -0,0 +1,262 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.javascript.tests.es6; + +import static org.junit.Assert.assertEquals; + +import java.util.Locale; +import org.junit.Test; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.EcmaError; +import org.mozilla.javascript.Scriptable; +import org.mozilla.javascript.testutils.Utils; + +public class NativeNumber2Test { + + @Test + public void toLocaleString_no402() { + Utils.assertWithAllModes("1", "let n = 1; n.toLocaleString()"); + Utils.assertWithAllModes("1", "(1.0).toLocaleString()"); + + Utils.assertWithAllModes("3.14", "let n = 3.14; n.toLocaleString()"); + Utils.assertWithAllModes("-0.007", "let n = -0.007; n.toLocaleString()"); + + Utils.assertWithAllModes("10000", "1e4.toLocaleString()"); + Utils.assertWithAllModes("1e-10", "let n = 1e-10; n.toLocaleString()"); + Utils.assertWithAllModes("1e-10", "1e-10.toLocaleString()"); + + Utils.assertWithAllModes("0.01", "1e-2.toLocaleString()"); + + Utils.assertWithAllModes("NaN", "NaN.toLocaleString()"); + Utils.assertWithAllModes("Infinity", "Infinity.toLocaleString()"); + Utils.assertWithAllModes("-Infinity", "(-Infinity).toLocaleString()"); + } + + @Test + public void toLocaleString_no402IgnoreParams() { + Utils.assertWithAllModes("1.234", "let n = 1.234; n.toLocaleString('en-US')"); + Utils.assertWithAllModes("1.234", "let n = 1.234; n.toLocaleString('de')"); + Utils.assertWithAllModes("1.234", "let n = 1.234; n.toLocaleString('de-DE')"); + } + + @Test + public void toLocaleString() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString()"); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString()"); + + assertWithAllModes402("3.14", "let n = 3.14; n.toLocaleString()"); + assertWithAllModes402("-0.007", "let n = -0.007; n.toLocaleString()"); + + assertWithAllModes402("10,000", "1e4.toLocaleString()"); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString()"); + assertWithAllModes402("0", "1e-10.toLocaleString()"); + + assertWithAllModes402("0.01", "1e-2.toLocaleString()"); + + assertWithAllModes402("NaN", "NaN.toLocaleString()"); + assertWithAllModes402("∞", "Infinity.toLocaleString()"); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString()"); + } + + @Test + public void toLocaleString_Invalid() { + Utils.assertException( + Utils.contextFactoryWithFeatures(Context.FEATURE_INTL_402), + Context.VERSION_ES6, + EcmaError.class, + "RangeError: Invalid language tag: 77", + "let n = 1; n.toLocaleString('77')"); + + assertWithAllModes402("1", "let n = 1; n.toLocaleString(77)"); + } + + @Test + public void toLocaleString_GermanContext() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString()", Locale.GERMAN); + + assertWithAllModes402("3,14", "let n = 3.14; n.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("-0,007", "let n = -0.007; n.toLocaleString()", Locale.GERMAN); + + assertWithAllModes402("10.000", "1e4.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("0", "1e-10.toLocaleString()", Locale.GERMAN); + + assertWithAllModes402("0,01", "1e-2.toLocaleString()", Locale.GERMAN); + + assertWithAllModes402("NaN", "NaN.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("∞", "Infinity.toLocaleString()", Locale.GERMAN); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString()", Locale.GERMAN); + } + + @Test + public void toLocaleString_JapanContext() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString()", Locale.JAPAN); + + assertWithAllModes402("3.14", "let n = 3.14; n.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("-0.007", "let n = -0.007; n.toLocaleString()", Locale.JAPAN); + + assertWithAllModes402("10,000", "1e4.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("0", "1e-10.toLocaleString()", Locale.JAPAN); + + assertWithAllModes402("0.01", "1e-2.toLocaleString()", Locale.JAPAN); + + assertWithAllModes402("NaN", "NaN.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("∞", "Infinity.toLocaleString()", Locale.JAPAN); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString()", Locale.JAPAN); + } + + @Test + public void toLocaleString_ArabicContext() { + assertWithAllModes402( + "\u0661", "let n = 1; n.toLocaleString('ar-SA')", Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u0661", "let n = 1.0; n.toLocaleString('ar-SA')", Locale.forLanguageTag("ar-SA")); + + assertWithAllModes402( + "\u0663\u066b\u0661\u0664", + "let n = 3.14; n.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u061c\u002d\u0660\u066b\u0660\u0660\u0667", + "let n = -0.007; n.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + + assertWithAllModes402( + "\u0661\u0660\u066c\u0660\u0660\u0660", + "1e4.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u0660", + "let n = 1e-10; n.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u0660", "1e-10.toLocaleString('ar-SA')", Locale.forLanguageTag("ar-SA")); + + assertWithAllModes402( + "\u0660\u066b\u0660\u0661", + "1e-2.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + + assertWithAllModes402( + "\u0644\u064a\u0633\u00a0\u0631\u0642\u0645", + "NaN.toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u221e", "Infinity.toLocaleString('ar-SA')", Locale.forLanguageTag("ar-SA")); + assertWithAllModes402( + "\u061c\u002d\u221e", + "(-Infinity).toLocaleString('ar-SA')", + Locale.forLanguageTag("ar-SA")); + } + + @Test + public void toLocaleString_de() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString('de')"); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString('de')"); + + assertWithAllModes402("3,14", "let n = 3.14; n.toLocaleString('de')"); + assertWithAllModes402("-0,007", "let n = -0.007; n.toLocaleString('de')"); + + assertWithAllModes402("10.000", "1e4.toLocaleString('de')"); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString('de')"); + assertWithAllModes402("0", "1e-10.toLocaleString('de')"); + + assertWithAllModes402("0,01", "1e-2.toLocaleString('de')"); + + assertWithAllModes402("NaN", "NaN.toLocaleString('de')"); + assertWithAllModes402("∞", "Infinity.toLocaleString('de')"); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString('de')"); + } + + @Test + public void toLocaleString_deDE() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString('de-DE')"); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString('de-DE')"); + + assertWithAllModes402("3,14", "let n = 3.14; n.toLocaleString('de-DE')"); + assertWithAllModes402("-0,007", "let n = -0.007; n.toLocaleString('de-DE')"); + + assertWithAllModes402("10.000", "1e4.toLocaleString('de-DE')"); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString('de-DE')"); + assertWithAllModes402("0", "1e-10.toLocaleString('de-DE')"); + + assertWithAllModes402("0,01", "1e-2.toLocaleString('de-DE')"); + + assertWithAllModes402("NaN", "NaN.toLocaleString('de-DE')"); + assertWithAllModes402("∞", "Infinity.toLocaleString('de-DE')"); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString('de-DE')"); + } + + @Test + public void toLocaleString_Japan() { + assertWithAllModes402("1", "let n = 1; n.toLocaleString('japan')"); + assertWithAllModes402("1", "let n = 1.0; n.toLocaleString('japan')"); + + assertWithAllModes402("3.14", "let n = 3.14; n.toLocaleString('japan')"); + assertWithAllModes402("-0.007", "let n = -0.007; n.toLocaleString('japan')"); + + assertWithAllModes402("10,000", "1e4.toLocaleString('japan')"); + assertWithAllModes402("0", "let n = 1e-10; n.toLocaleString('japan')"); + assertWithAllModes402("0", "1e-10.toLocaleString('japan')"); + + assertWithAllModes402("0.01", "1e-2.toLocaleString('japan')"); + + assertWithAllModes402("NaN", "NaN.toLocaleString('japan')"); + assertWithAllModes402("∞", "Infinity.toLocaleString('japan')"); + assertWithAllModes402("-∞", "(-Infinity).toLocaleString('japan')"); + } + + @Test + public void toLocaleString_Arabic() { + assertWithAllModes402("\u0661", "let n = 1; n.toLocaleString('ar-SA')"); + assertWithAllModes402("\u0661", "let n = 1.0; n.toLocaleString('ar-SA')"); + + assertWithAllModes402( + "\u0663\u066b\u0661\u0664", "let n = 3.14; n.toLocaleString('ar-SA')"); + assertWithAllModes402( + "\u061c\u002d\u0660\u066b\u0660\u0660\u0667", + "let n = -0.007; n.toLocaleString('ar-SA')"); + + assertWithAllModes402( + "\u0661\u0660\u066c\u0660\u0660\u0660", "1e4.toLocaleString('ar-SA')"); + assertWithAllModes402("\u0660", "let n = 1e-10; n.toLocaleString('ar-SA')"); + assertWithAllModes402("\u0660", "1e-10.toLocaleString('ar-SA')"); + + assertWithAllModes402("\u0660\u066b\u0660\u0661", "1e-2.toLocaleString('ar-SA')"); + + assertWithAllModes402( + "\u0644\u064a\u0633\u00a0\u0631\u0642\u0645", "NaN.toLocaleString('ar-SA')"); + assertWithAllModes402("\u221e", "Infinity.toLocaleString('ar-SA')"); + assertWithAllModes402("\u061c\u002d\u221e", "(-Infinity).toLocaleString('ar-SA')"); + } + + private void assertWithAllModes402(final Object expected, final String script) { + Utils.runWithAllModes( + Utils.contextFactoryWithFeatures(Context.FEATURE_INTL_402), + cx -> { + final Scriptable scope = cx.initStandardObjects(); + + final Object res = cx.evaluateString(scope, script, "test.js", 0, null); + assertEquals(expected, res); + return null; + }); + } + + private void assertWithAllModes402(final Object expected, final String script, Locale locale) { + Utils.runWithAllModes( + Utils.contextFactoryWithFeatures(Context.FEATURE_INTL_402), + cx -> { + final Scriptable scope = cx.initStandardObjects(); + cx.setLocale(locale); + + final Object res = cx.evaluateString(scope, script, "test.js", 0, null); + assertEquals(expected, res); + return null; + }); + } +} diff --git a/tests/testsrc/test262.properties b/tests/testsrc/test262.properties index 7ab0485d74..9ef7e9086d 100644 --- a/tests/testsrc/test262.properties +++ b/tests/testsrc/test262.properties @@ -2937,192 +2937,190 @@ built-ins/parseInt 1/55 (1.82%) built-ins/undefined 0/8 (0.0%) -~intl402 - -language/arguments-object 183/263 (69.58%) - mapped/mapped-arguments-nonconfigurable-3.js non-strict - mapped/mapped-arguments-nonconfigurable-delete-1.js non-strict - mapped/mapped-arguments-nonconfigurable-delete-2.js non-strict - mapped/mapped-arguments-nonconfigurable-delete-3.js non-strict - mapped/mapped-arguments-nonconfigurable-delete-4.js non-strict - mapped/mapped-arguments-nonconfigurable-nonwritable-1.js non-strict - mapped/mapped-arguments-nonconfigurable-nonwritable-2.js non-strict - mapped/mapped-arguments-nonconfigurable-nonwritable-3.js non-strict - mapped/mapped-arguments-nonconfigurable-nonwritable-4.js non-strict - mapped/mapped-arguments-nonconfigurable-nonwritable-5.js non-strict - mapped/mapped-arguments-nonconfigurable-strict-delete-1.js non-strict - mapped/mapped-arguments-nonconfigurable-strict-delete-2.js non-strict - mapped/mapped-arguments-nonconfigurable-strict-delete-3.js non-strict - mapped/mapped-arguments-nonconfigurable-strict-delete-4.js non-strict - mapped/mapped-arguments-nonwritable-nonconfigurable-1.js non-strict - mapped/mapped-arguments-nonwritable-nonconfigurable-2.js non-strict - mapped/mapped-arguments-nonwritable-nonconfigurable-3.js non-strict - mapped/mapped-arguments-nonwritable-nonconfigurable-4.js non-strict - mapped/nonconfigurable-descriptors-basic.js non-strict - mapped/nonconfigurable-descriptors-set-value-by-arguments.js non-strict - mapped/nonconfigurable-descriptors-set-value-with-define-property.js non-strict - mapped/nonconfigurable-descriptors-with-param-assign.js non-strict - mapped/nonconfigurable-nonenumerable-nonwritable-descriptors-basic.js non-strict - mapped/nonconfigurable-nonenumerable-nonwritable-descriptors-set-by-arguments.js non-strict - mapped/nonconfigurable-nonenumerable-nonwritable-descriptors-set-by-param.js non-strict - mapped/nonconfigurable-nonwritable-descriptors-basic.js non-strict - mapped/nonconfigurable-nonwritable-descriptors-define-property-consecutive.js non-strict - mapped/nonconfigurable-nonwritable-descriptors-set-by-arguments.js non-strict - mapped/nonconfigurable-nonwritable-descriptors-set-by-param.js non-strict - mapped/nonwritable-nonconfigurable-descriptors-basic.js non-strict - mapped/nonwritable-nonconfigurable-descriptors-set-by-arguments.js non-strict - mapped/nonwritable-nonconfigurable-descriptors-set-by-param.js non-strict - mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-basic.js non-strict - mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-set-by-arguments.js non-strict - mapped/nonwritable-nonenumerable-nonconfigurable-descriptors-set-by-param.js non-strict - unmapped/via-params-dstr.js non-strict - unmapped/via-params-rest.js non-strict - async-gen-meth-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - async-gen-meth-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - async-gen-meth-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - async-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - async-gen-meth-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - async-gen-named-func-expr-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - async-gen-named-func-expr-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - async-gen-named-func-expr-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - async-gen-named-func-expr-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - async-gen-named-func-expr-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-func-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-func-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-func-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-func-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-func-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-static-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-decl-async-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-decl-async-private-gen-meth-args-trailing-comma-multiple.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-args-trailing-comma-null.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-args-trailing-comma-single-args.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-args-trailing-comma-undefined.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-static-args-trailing-comma-null.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, class, async]} - cls-decl-async-private-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [async-iteration, class, async]} - cls-decl-gen-meth-args-trailing-comma-multiple.js - cls-decl-gen-meth-args-trailing-comma-null.js - cls-decl-gen-meth-args-trailing-comma-single-args.js - cls-decl-gen-meth-args-trailing-comma-spread-operator.js - cls-decl-gen-meth-args-trailing-comma-undefined.js - cls-decl-gen-meth-static-args-trailing-comma-multiple.js - cls-decl-gen-meth-static-args-trailing-comma-null.js - cls-decl-gen-meth-static-args-trailing-comma-single-args.js - cls-decl-gen-meth-static-args-trailing-comma-spread-operator.js - cls-decl-gen-meth-static-args-trailing-comma-undefined.js - cls-decl-meth-args-trailing-comma-multiple.js - cls-decl-meth-args-trailing-comma-null.js - cls-decl-meth-args-trailing-comma-single-args.js - cls-decl-meth-args-trailing-comma-spread-operator.js - cls-decl-meth-args-trailing-comma-undefined.js - cls-decl-meth-static-args-trailing-comma-multiple.js - cls-decl-meth-static-args-trailing-comma-null.js - cls-decl-meth-static-args-trailing-comma-single-args.js - cls-decl-meth-static-args-trailing-comma-spread-operator.js - cls-decl-meth-static-args-trailing-comma-undefined.js - cls-decl-private-gen-meth-args-trailing-comma-multiple.js {unsupported: [class]} - cls-decl-private-gen-meth-args-trailing-comma-null.js {unsupported: [class]} - cls-decl-private-gen-meth-args-trailing-comma-single-args.js {unsupported: [class]} - cls-decl-private-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-decl-private-gen-meth-args-trailing-comma-undefined.js {unsupported: [class]} - cls-decl-private-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [class]} - cls-decl-private-gen-meth-static-args-trailing-comma-null.js {unsupported: [class]} - cls-decl-private-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [class]} - cls-decl-private-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-decl-private-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [class]} - cls-decl-private-meth-args-trailing-comma-multiple.js {unsupported: [class]} - cls-decl-private-meth-args-trailing-comma-null.js {unsupported: [class]} - cls-decl-private-meth-args-trailing-comma-single-args.js {unsupported: [class]} - cls-decl-private-meth-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-decl-private-meth-args-trailing-comma-undefined.js {unsupported: [class]} - cls-decl-private-meth-static-args-trailing-comma-multiple.js {unsupported: [class]} - cls-decl-private-meth-static-args-trailing-comma-null.js {unsupported: [class]} - cls-decl-private-meth-static-args-trailing-comma-single-args.js {unsupported: [class]} - cls-decl-private-meth-static-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-decl-private-meth-static-args-trailing-comma-undefined.js {unsupported: [class]} - cls-expr-async-gen-func-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-func-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-func-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-func-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-func-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-static-args-trailing-comma-null.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, async]} - cls-expr-async-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [async-iteration, async]} - cls-expr-async-private-gen-meth-args-trailing-comma-multiple.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-args-trailing-comma-null.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-args-trailing-comma-single-args.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-args-trailing-comma-undefined.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-static-args-trailing-comma-null.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [async-iteration, class, async]} - cls-expr-async-private-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [async-iteration, class, async]} - cls-expr-gen-meth-args-trailing-comma-multiple.js - cls-expr-gen-meth-args-trailing-comma-null.js - cls-expr-gen-meth-args-trailing-comma-single-args.js - cls-expr-gen-meth-args-trailing-comma-spread-operator.js - cls-expr-gen-meth-args-trailing-comma-undefined.js - cls-expr-gen-meth-static-args-trailing-comma-multiple.js - cls-expr-gen-meth-static-args-trailing-comma-null.js - cls-expr-gen-meth-static-args-trailing-comma-single-args.js - cls-expr-gen-meth-static-args-trailing-comma-spread-operator.js - cls-expr-gen-meth-static-args-trailing-comma-undefined.js - cls-expr-meth-args-trailing-comma-multiple.js - cls-expr-meth-args-trailing-comma-null.js - cls-expr-meth-args-trailing-comma-single-args.js - cls-expr-meth-args-trailing-comma-spread-operator.js - cls-expr-meth-args-trailing-comma-undefined.js - cls-expr-meth-static-args-trailing-comma-multiple.js - cls-expr-meth-static-args-trailing-comma-null.js - cls-expr-meth-static-args-trailing-comma-single-args.js - cls-expr-meth-static-args-trailing-comma-spread-operator.js - cls-expr-meth-static-args-trailing-comma-undefined.js - cls-expr-private-gen-meth-args-trailing-comma-multiple.js {unsupported: [class]} - cls-expr-private-gen-meth-args-trailing-comma-null.js {unsupported: [class]} - cls-expr-private-gen-meth-args-trailing-comma-single-args.js {unsupported: [class]} - cls-expr-private-gen-meth-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-expr-private-gen-meth-args-trailing-comma-undefined.js {unsupported: [class]} - cls-expr-private-gen-meth-static-args-trailing-comma-multiple.js {unsupported: [class]} - cls-expr-private-gen-meth-static-args-trailing-comma-null.js {unsupported: [class]} - cls-expr-private-gen-meth-static-args-trailing-comma-single-args.js {unsupported: [class]} - cls-expr-private-gen-meth-static-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-expr-private-gen-meth-static-args-trailing-comma-undefined.js {unsupported: [class]} - cls-expr-private-meth-args-trailing-comma-multiple.js {unsupported: [class]} - cls-expr-private-meth-args-trailing-comma-null.js {unsupported: [class]} - cls-expr-private-meth-args-trailing-comma-single-args.js {unsupported: [class]} - cls-expr-private-meth-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-expr-private-meth-args-trailing-comma-undefined.js {unsupported: [class]} - cls-expr-private-meth-static-args-trailing-comma-multiple.js {unsupported: [class]} - cls-expr-private-meth-static-args-trailing-comma-null.js {unsupported: [class]} - cls-expr-private-meth-static-args-trailing-comma-single-args.js {unsupported: [class]} - cls-expr-private-meth-static-args-trailing-comma-spread-operator.js {unsupported: [class]} - cls-expr-private-meth-static-args-trailing-comma-undefined.js {unsupported: [class]} - func-decl-args-trailing-comma-spread-operator.js - func-expr-args-trailing-comma-spread-operator.js - gen-func-decl-args-trailing-comma-spread-operator.js - gen-func-expr-args-trailing-comma-spread-operator.js - gen-meth-args-trailing-comma-spread-operator.js - meth-args-trailing-comma-spread-operator.js +intl402 + Array/prototype/toLocaleString 2/2 (100.0%) + BigInt/prototype/toLocaleString/de-DE.js + BigInt/prototype/toLocaleString/default-options-object-prototype.js + BigInt/prototype/toLocaleString/en-US.js + BigInt/prototype/toLocaleString/returns-same-results-as-NumberFormat.js + BigInt/prototype/toLocaleString/taint-Intl-NumberFormat.js + BigInt/prototype/toLocaleString/this-value-invalid.js + BigInt/prototype/toLocaleString/throws-same-exceptions-as-NumberFormat.js + Collator 65/65 (100.0%) + Collator/prototype + Collator/prototype/compare + Collator/prototype/constructor + Collator/prototype/resolvedOptions + Collator/prototype/toStringTag + Collator/supportedLocalesOf 65/65 (100.0%) + Date/prototype/toLocaleDateString/builtin.js + Date/prototype/toLocaleString/builtin.js + Date/prototype/toLocaleString/default-options-object-prototype.js + Date/prototype/toLocaleTimeString/builtin.js + Date/prototype/returns-same-results-as-DateTimeFormat.js + Date/prototype/taint-Intl-DateTimeFormat.js + Date/prototype/throws-same-exceptions-as-DateTimeFormat.js + DateTimeFormat 197/197 (100.0%) + DateTimeFormat/prototype + DateTimeFormat/prototype/constructor + DateTimeFormat/prototype/format + DateTimeFormat/prototype/formatRange + DateTimeFormat/prototype/formatRangeToParts + DateTimeFormat/prototype/formatToParts + DateTimeFormat/prototype/resolvedOptions + DateTimeFormat/prototype/toStringTag + DateTimeFormat/supportedLocalesOf + DisplayNames 57/57 (100.0%) + DisplayNames/prototype + DisplayNames/prototype/of + DisplayNames/prototype/resolvedOptions + DurationFormat 111/111 (100.0%) + DurationFormat/prototype + DurationFormat/prototype/constructor + DurationFormat/prototype/format + DurationFormat/prototype/formatToParts + DurationFormat/prototype/resolvedOptions + DurationFormat/prototype/toStringTag + DurationFormat/supportedLocalesOf + Intl 65/65 (100.0%) + Intl/getCanonicalLocales + Intl/supportedValuesOf + Intl/toStringTag + ListFormat/constructor + ListFormat/constructor/constructor + ListFormat/constructor/supportedLocalesOf + ListFormat/instance + ListFormat/prototype + ListFormat/prototype/constructor + ListFormat/prototype/format + ListFormat/prototype/formatToParts + ListFormat/prototype/resolvedOptions + ListFormat/prototype/toStringTag + Locale 152/152 (100.0%) + Locale/prototype + Locale/prototype/baseName + Locale/prototype/calendar + Locale/prototype/caseFirst + Locale/prototype/collation + Locale/prototype/constructor + Locale/prototype/firstDayOfWeek + Locale/prototype/getCalendars + Locale/prototype/getCollations + Locale/prototype/getHourCycles + Locale/prototype/getNumberingSystems + Locale/prototype/getTextInfo + Locale/prototype/getTimeZones + Locale/prototype/getWeekInfo + Locale/prototype/hourCycle + Locale/prototype/language + Locale/prototype/maximize + Locale/prototype/minimize + Locale/prototype/numberingSystem + Locale/prototype/numeric + Locale/prototype/region + Locale/prototype/script + Locale/prototype/toString + Locale/prototype/toStringTag + Locale/prototype/variants + Number/prototype/toLocaleString/default-options-object-prototype.js + Number/prototype/toLocaleString/returns-same-results-as-NumberFormat.js + Number/prototype/toLocaleString/taint-Intl-NumberFormat.js + Number/prototype/toLocaleString/throws-same-exceptions-as-NumberFormat.js + NumberFormat 253/253 (100.0%) + NumberFormat/prototype + NumberFormat/prototype/constructor + NumberFormat/prototype/format + NumberFormat/prototype/formatRange + NumberFormat/prototype/formatRangeToParts + NumberFormat/prototype/formatToParts + NumberFormat/prototype/resolvedOptions + NumberFormat/prototype/toStringTag + NumberFormat/supportedLocalesOf + PluralRules 52/52 (100.0%) + PluralRules/prototype + PluralRules/prototype/constructor + PluralRules/prototype/resolvedOptions + PluralRules/prototype/select + PluralRules/prototype/selectRange + PluralRules/prototype/toStringTag + PluralRules/supportedLocalesOf + RelativeTimeFormat/constructor + RelativeTimeFormat/constructor/constructor + RelativeTimeFormat/constructor/supportedLocalesOf + RelativeTimeFormat/instance + RelativeTimeFormat/prototype + RelativeTimeFormat/prototype/constructor + RelativeTimeFormat/prototype/format + RelativeTimeFormat/prototype/formatToParts + RelativeTimeFormat/prototype/resolvedOptions + RelativeTimeFormat/prototype/toStringTag + Segmenter 78/78 (100.0%) + Segmenter/constructor + Segmenter/constructor/constructor + Segmenter/constructor/supportedLocalesOf + Segmenter/instance + Segmenter/prototype + Segmenter/prototype/constructor + Segmenter/prototype/resolvedOptions + Segmenter/prototype/segment + Segmenter/prototype/segment/containing + Segmenter/prototype/toStringTag + String/prototype/localeCompare/default-options-object-prototype.js + String/prototype/localeCompare/returns-same-results-as-Collator.js + String/prototype/localeCompare/taint-Intl-Collator.js + String/prototype/localeCompare/throws-same-exceptions-as-Collator.js + String/prototype/toLocaleUpperCase/special_casing_Lithuanian.js + Temporal/Duration + Temporal/Duration/compare + Temporal/Duration/prototype + Temporal/Instant/prototype/toLocaleString + Temporal/Instant/prototype/toString + Temporal/Instant/prototype/toZonedDateTimeISO + Temporal/Now/plainDateTimeISO + Temporal/Now/zonedDateTimeISO + Temporal/PlainDate + Temporal/PlainDate/compare + Temporal/PlainDate/from + Temporal/PlainDate/prototype + Temporal/PlainDateTime + Temporal/PlainDateTime/compare + Temporal/PlainDateTime/from + Temporal/PlainDateTime/prototype + Temporal/PlainMonthDay + Temporal/PlainMonthDay/from + Temporal/PlainMonthDay/prototype + Temporal/PlainTime/protorype/toLocaleString + Temporal/PlainYearMonth + Temporal/PlainYearMonth/compare + Temporal/PlainYearMonth/from + Temporal/PlainYearMonth/prototype + Temporal/ZonedDateTime + Temporal/ZonedDateTime/compare + Temporal/ZonedDateTime/from + Temporal/ZonedDateTime/prototype + TypedArray/prototype/toLocaleString 1/1 (100.0%) + constructors-string-and-single-element-array.js + constructors-taint-Object-prototype.js + constructors-taint-Object-prototype-2.js + default-locale-is-canonicalized.js + default-locale-is-supported.js + fallback-locales-are-supported.js + language-tags-canonicalized.js + language-tags-invalid.js + language-tags-valid.js + language-tags-with-underscore.js + supportedLocalesOf-consistent-with-resolvedOptions.js + supportedLocalesOf-default-locale-and-zxx-locale.js + supportedLocalesOf-duplicate-elements-removed.js + supportedLocalesOf-empty-and-undefined.js + supportedLocalesOf-locales-arg-coered-to-object.js + supportedLocalesOf-locales-arg-empty-array.js + supportedLocalesOf-returned-array-elements-are-not-frozen.js + supportedLocalesOf-taint-Array.js + supportedLocalesOf-taint-Array-2.js + supportedLocalesOf-test-option-localeMatcher.js + supportedLocalesOf-throws-if-element-not-string-or-object.js + supportedLocalesOf-unicode-extensions-ignored.js language/asi 0/102 (0.0%)