diff --git a/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js b/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js index 635ea414c614e15b15f595555b6c530396a9a9b8..8edb28f20392521e1ce98ff763c05a6776f733a7 100644 --- a/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js +++ b/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js @@ -12,6 +12,8 @@ info: | features: [Intl.ListFormat] ---*/ +assert.sameValue(typeof Intl.ListFormat, "function"); + assert.throws(TypeError, function() { Intl.ListFormat(); }); diff --git a/test/intl402/ListFormat/constructor/constructor/options-invalid.js b/test/intl402/ListFormat/constructor/constructor/options-invalid.js index 7f1dfd085ca48b251104f6d3e626db31bb0daf3f..1933e50b092c591cc7d0a2000bca796b460d5638 100644 --- a/test/intl402/ListFormat/constructor/constructor/options-invalid.js +++ b/test/intl402/ListFormat/constructor/constructor/options-invalid.js @@ -11,4 +11,7 @@ info: | features: [Intl.ListFormat] ---*/ -assert.throws(TypeError, function() { new Intl.ListFormat([], null) }) +assert.sameValue(typeof Intl.ListFormat, "function"); +assert.throws(TypeError, function() { + new Intl.ListFormat([], null); +}); diff --git a/test/intl402/ListFormat/prototype/format/branding.js b/test/intl402/ListFormat/prototype/format/branding.js index d2324741654d8c0f04e54eb9d4380b3a7af93bb5..23e8aa670b7ae105540bb3e112fe51463766f931 100644 --- a/test/intl402/ListFormat/prototype/format/branding.js +++ b/test/intl402/ListFormat/prototype/format/branding.js @@ -12,14 +12,16 @@ info: | features: [Intl.ListFormat] ---*/ -const fn = Intl.ListFormat.prototype.format; +const format = Intl.ListFormat.prototype.format; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat), "Intl.ListFormat"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); +assert.sameValue(typeof format, "function"); + +assert.throws(TypeError, () => format.call(undefined), "undefined"); +assert.throws(TypeError, () => format.call(null), "null"); +assert.throws(TypeError, () => format.call(true), "true"); +assert.throws(TypeError, () => format.call(""), "empty string"); +assert.throws(TypeError, () => format.call(Symbol()), "symbol"); +assert.throws(TypeError, () => format.call(1), "1"); +assert.throws(TypeError, () => format.call({}), "plain object"); +assert.throws(TypeError, () => format.call(Intl.ListFormat), "Intl.ListFormat"); +assert.throws(TypeError, () => format.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); diff --git a/test/intl402/ListFormat/prototype/formatToParts/branding.js b/test/intl402/ListFormat/prototype/formatToParts/branding.js index 0ed866288d581be907ed80fb58870dea3ea6b877..4d1af02eb7f6cf8ae065c8691dbead415cd584f4 100644 --- a/test/intl402/ListFormat/prototype/formatToParts/branding.js +++ b/test/intl402/ListFormat/prototype/formatToParts/branding.js @@ -12,14 +12,15 @@ info: | features: [Intl.ListFormat] ---*/ -const fn = Intl.ListFormat.prototype.formatToParts; +const formatToParts = Intl.ListFormat.prototype.formatToParts; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat), "Intl.ListFormat"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); +assert.sameValue(typeof formatToParts, "function"); +assert.throws(TypeError, () => formatToParts.call(undefined), "undefined"); +assert.throws(TypeError, () => formatToParts.call(null), "null"); +assert.throws(TypeError, () => formatToParts.call(true), "true"); +assert.throws(TypeError, () => formatToParts.call(""), "empty string"); +assert.throws(TypeError, () => formatToParts.call(Symbol()), "symbol"); +assert.throws(TypeError, () => formatToParts.call(1), "1"); +assert.throws(TypeError, () => formatToParts.call({}), "plain object"); +assert.throws(TypeError, () => formatToParts.call(Intl.ListFormat), "Intl.ListFormat"); +assert.throws(TypeError, () => formatToParts.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); diff --git a/test/intl402/ListFormat/prototype/resolvedOptions/branding.js b/test/intl402/ListFormat/prototype/resolvedOptions/branding.js index fbf3616c10194fdd12057709f1911b6d02eb80c8..852ba562d0595633be9c644cb1cd1522f4ec9a59 100644 --- a/test/intl402/ListFormat/prototype/resolvedOptions/branding.js +++ b/test/intl402/ListFormat/prototype/resolvedOptions/branding.js @@ -12,14 +12,15 @@ info: | features: [Intl.ListFormat] ---*/ -const fn = Intl.ListFormat.prototype.resolvedOptions; +const resolvedOptions = Intl.ListFormat.prototype.resolvedOptions; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat), "Intl.ListFormat"); -assert.throws(TypeError, () => fn.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); +assert.sameValue(typeof resolvedOptions, "function"); +assert.throws(TypeError, () => resolvedOptions.call(undefined), "undefined"); +assert.throws(TypeError, () => resolvedOptions.call(null), "null"); +assert.throws(TypeError, () => resolvedOptions.call(true), "true"); +assert.throws(TypeError, () => resolvedOptions.call(""), "empty string"); +assert.throws(TypeError, () => resolvedOptions.call(Symbol()), "symbol"); +assert.throws(TypeError, () => resolvedOptions.call(1), "1"); +assert.throws(TypeError, () => resolvedOptions.call({}), "plain object"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.ListFormat), "Intl.ListFormat"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.ListFormat.prototype), "Intl.ListFormat.prototype"); diff --git a/test/intl402/Locale/prototype/maximize/branding.js b/test/intl402/Locale/prototype/maximize/branding.js index 83c6e28c31116017c0eb65a77baa9e55d8e22560..2605eb086403c488153e7ab723dfc9a8cbd0370c 100644 --- a/test/intl402/Locale/prototype/maximize/branding.js +++ b/test/intl402/Locale/prototype/maximize/branding.js @@ -13,7 +13,10 @@ info: | features: [Intl.Locale] ---*/ -const fn = Intl.Locale.prototype.maximize; +const maximize = Intl.Locale.prototype.maximize; + +assert.sameValue(typeof maximize, "function"); + const invalidValues = [ undefined, null, @@ -26,5 +29,5 @@ const invalidValues = [ ]; for (const invalidValue of invalidValues) { - assert.throws(TypeError, () => fn.call(invalidValue)); + assert.throws(TypeError, () => maximize.call(invalidValue)); } diff --git a/test/intl402/Locale/prototype/minimize/branding.js b/test/intl402/Locale/prototype/minimize/branding.js index 41f42e692a6e672dfde1e9f18e6d3a4ed1af5eae..97dd9034854dbf6167394c507b5ac67975a22b06 100644 --- a/test/intl402/Locale/prototype/minimize/branding.js +++ b/test/intl402/Locale/prototype/minimize/branding.js @@ -13,7 +13,10 @@ info: | features: [Intl.Locale] ---*/ -const fn = Intl.Locale.prototype.minimize; +const minimize = Intl.Locale.prototype.minimize; + +assert.sameValue(typeof minimize, "function"); + const invalidValues = [ undefined, null, @@ -26,5 +29,5 @@ const invalidValues = [ ]; for (const invalidValue of invalidValues) { - assert.throws(TypeError, () => fn.call(invalidValue)); + assert.throws(TypeError, () => minimize.call(invalidValue)); } diff --git a/test/intl402/Locale/prototype/toString/branding.js b/test/intl402/Locale/prototype/toString/branding.js index 25d85a5758803ce84522193e6644c1c38060d7db..2eb14d3dab392f2ee6c9c462a45d624d9821dc1b 100644 --- a/test/intl402/Locale/prototype/toString/branding.js +++ b/test/intl402/Locale/prototype/toString/branding.js @@ -13,7 +13,10 @@ info: | features: [Intl.Locale] ---*/ -const fn = Intl.Locale.prototype.toString; +const toString = Intl.Locale.prototype.toString; + +assert.sameValue(typeof toString, "function"); + const invalidValues = [ undefined, null, @@ -26,5 +29,5 @@ const invalidValues = [ ]; for (const invalidValue of invalidValues) { - assert.throws(TypeError, () => fn.call(invalidValue)); + assert.throws(TypeError, () => toString.call(invalidValue)); } diff --git a/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/branding.js b/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/branding.js index 5b6384bd0658b04c85192f42faaeec7b91c3015b..1e6a76cb51b9913e092bc6410843b978996d57b5 100644 --- a/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/branding.js +++ b/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/branding.js @@ -10,7 +10,10 @@ info: | features: [Intl.RelativeTimeFormat] ---*/ -const fn = Intl.RelativeTimeFormat.supportedLocalesOf; +const supportedLocalesOf = Intl.RelativeTimeFormat.supportedLocalesOf; + +assert.sameValue(typeof supportedLocalesOf, "function"); + const thisValues = [ undefined, null, @@ -24,6 +27,6 @@ const thisValues = [ ]; for (const thisValue of thisValues) { - const result = fn.call(thisValue); + const result = supportedLocalesOf.call(thisValue); assert.sameValue(Array.isArray(result), true); } diff --git a/test/intl402/RelativeTimeFormat/prototype/format/branding.js b/test/intl402/RelativeTimeFormat/prototype/format/branding.js index 8dddd83b90bf00e0b0f2daef487aef99e3d34d03..d8f4a75e4c459e157aaf529300db5ee23a8a83ce 100644 --- a/test/intl402/RelativeTimeFormat/prototype/format/branding.js +++ b/test/intl402/RelativeTimeFormat/prototype/format/branding.js @@ -11,14 +11,16 @@ info: | features: [Intl.RelativeTimeFormat] ---*/ -const fn = Intl.RelativeTimeFormat.prototype.format; +const format = Intl.RelativeTimeFormat.prototype.format; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); +assert.sameValue(typeof format, "function"); + +assert.throws(TypeError, () => format.call(undefined), "undefined"); +assert.throws(TypeError, () => format.call(null), "null"); +assert.throws(TypeError, () => format.call(true), "true"); +assert.throws(TypeError, () => format.call(""), "empty string"); +assert.throws(TypeError, () => format.call(Symbol()), "symbol"); +assert.throws(TypeError, () => format.call(1), "1"); +assert.throws(TypeError, () => format.call({}), "plain object"); +assert.throws(TypeError, () => format.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); +assert.throws(TypeError, () => format.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/branding.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/branding.js index d654275554cd696177362c26431475dd3321a9d6..d15513afbe6c3bc313641007cd698ab3f8a82418 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/branding.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/branding.js @@ -11,14 +11,16 @@ info: | features: [Intl.RelativeTimeFormat] ---*/ -const fn = Intl.RelativeTimeFormat.prototype.formatToParts; +const formatToParts = Intl.RelativeTimeFormat.prototype.formatToParts; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); +assert.sameValue(typeof formatToParts, "function"); + +assert.throws(TypeError, () => formatToParts.call(undefined), "undefined"); +assert.throws(TypeError, () => formatToParts.call(null), "null"); +assert.throws(TypeError, () => formatToParts.call(true), "true"); +assert.throws(TypeError, () => formatToParts.call(""), "empty string"); +assert.throws(TypeError, () => formatToParts.call(Symbol()), "symbol"); +assert.throws(TypeError, () => formatToParts.call(1), "1"); +assert.throws(TypeError, () => formatToParts.call({}), "plain object"); +assert.throws(TypeError, () => formatToParts.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); +assert.throws(TypeError, () => formatToParts.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); diff --git a/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/branding.js b/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/branding.js index fd547383a585b66e1499485342783dc0ebbdbb8b..dd90301b27b46f582fd20597660a3bba61b04833 100644 --- a/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/branding.js +++ b/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/branding.js @@ -11,14 +11,16 @@ info: | features: [Intl.RelativeTimeFormat] ---*/ -const fn = Intl.RelativeTimeFormat.prototype.resolvedOptions; +const resolvedOptions = Intl.RelativeTimeFormat.prototype.resolvedOptions; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); -assert.throws(TypeError, () => fn.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); +assert.sameValue(typeof resolvedOptions, "function"); + +assert.throws(TypeError, () => resolvedOptions.call(undefined), "undefined"); +assert.throws(TypeError, () => resolvedOptions.call(null), "null"); +assert.throws(TypeError, () => resolvedOptions.call(true), "true"); +assert.throws(TypeError, () => resolvedOptions.call(""), "empty string"); +assert.throws(TypeError, () => resolvedOptions.call(Symbol()), "symbol"); +assert.throws(TypeError, () => resolvedOptions.call(1), "1"); +assert.throws(TypeError, () => resolvedOptions.call({}), "plain object"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.RelativeTimeFormat), "Intl.RelativeTimeFormat"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.RelativeTimeFormat.prototype), "Intl.RelativeTimeFormat.prototype"); diff --git a/test/intl402/Segmenter/constructor/supportedLocalesOf/branding.js b/test/intl402/Segmenter/constructor/supportedLocalesOf/branding.js index 462398b6016ff8180e18aba780f4875dd50645f8..742dab1f3115518eafd2c5d1fd1372e96bf4ffc9 100644 --- a/test/intl402/Segmenter/constructor/supportedLocalesOf/branding.js +++ b/test/intl402/Segmenter/constructor/supportedLocalesOf/branding.js @@ -10,7 +10,10 @@ info: | features: [Intl.Segmenter] ---*/ -const fn = Intl.Segmenter.supportedLocalesOf; +const supportedLocalesOf = Intl.Segmenter.supportedLocalesOf; + +assert.sameValue(typeof supportedLocalesOf, "function"); + const thisValues = [ undefined, null, @@ -24,6 +27,6 @@ const thisValues = [ ]; for (const thisValue of thisValues) { - const result = fn.call(thisValue); + const result = supportedLocalesOf.call(thisValue); assert.sameValue(Array.isArray(result), true); } diff --git a/test/intl402/Segmenter/prototype/resolvedOptions/branding.js b/test/intl402/Segmenter/prototype/resolvedOptions/branding.js index 24d5a7bad62bb1a35e4ca98c8544c3610c7263e1..b596e8e1217d0dd3180413285080b5d9ec5493a3 100644 --- a/test/intl402/Segmenter/prototype/resolvedOptions/branding.js +++ b/test/intl402/Segmenter/prototype/resolvedOptions/branding.js @@ -11,14 +11,16 @@ info: | features: [Intl.Segmenter] ---*/ -const fn = Intl.Segmenter.prototype.resolvedOptions; +const resolvedOptions = Intl.Segmenter.prototype.resolvedOptions; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.Segmenter), "Intl.Segmenter"); -assert.throws(TypeError, () => fn.call(Intl.Segmenter.prototype), "Intl.Segmenter.prototype"); +assert.sameValue(typeof resolvedOptions, "function"); + +assert.throws(TypeError, () => resolvedOptions.call(undefined), "undefined"); +assert.throws(TypeError, () => resolvedOptions.call(null), "null"); +assert.throws(TypeError, () => resolvedOptions.call(true), "true"); +assert.throws(TypeError, () => resolvedOptions.call(""), "empty string"); +assert.throws(TypeError, () => resolvedOptions.call(Symbol()), "symbol"); +assert.throws(TypeError, () => resolvedOptions.call(1), "1"); +assert.throws(TypeError, () => resolvedOptions.call({}), "plain object"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.Segmenter), "Intl.Segmenter"); +assert.throws(TypeError, () => resolvedOptions.call(Intl.Segmenter.prototype), "Intl.Segmenter.prototype"); diff --git a/test/intl402/Segmenter/prototype/segment/branding.js b/test/intl402/Segmenter/prototype/segment/branding.js index d344285d92cbc9607b3e3886d58c468abfa65d6e..29f40d23e6fd0268f8b65b5f3f1a92cfa627dd23 100644 --- a/test/intl402/Segmenter/prototype/segment/branding.js +++ b/test/intl402/Segmenter/prototype/segment/branding.js @@ -11,14 +11,16 @@ info: | features: [Intl.Segmenter] ---*/ -const fn = Intl.Segmenter.prototype.segment; +const segment = Intl.Segmenter.prototype.segment; -assert.throws(TypeError, () => fn.call(undefined), "undefined"); -assert.throws(TypeError, () => fn.call(null), "null"); -assert.throws(TypeError, () => fn.call(true), "true"); -assert.throws(TypeError, () => fn.call(""), "empty string"); -assert.throws(TypeError, () => fn.call(Symbol()), "symbol"); -assert.throws(TypeError, () => fn.call(1), "1"); -assert.throws(TypeError, () => fn.call({}), "plain object"); -assert.throws(TypeError, () => fn.call(Intl.Segmenter), "Intl.Segmenter"); -assert.throws(TypeError, () => fn.call(Intl.Segmenter.prototype), "Intl.Segmenter.prototype"); +assert.sameValue(typeof segment, "function"); + +assert.throws(TypeError, () => segment.call(undefined), "undefined"); +assert.throws(TypeError, () => segment.call(null), "null"); +assert.throws(TypeError, () => segment.call(true), "true"); +assert.throws(TypeError, () => segment.call(""), "empty string"); +assert.throws(TypeError, () => segment.call(Symbol()), "symbol"); +assert.throws(TypeError, () => segment.call(1), "1"); +assert.throws(TypeError, () => segment.call({}), "plain object"); +assert.throws(TypeError, () => segment.call(Intl.Segmenter), "Intl.Segmenter"); +assert.throws(TypeError, () => segment.call(Intl.Segmenter.prototype), "Intl.Segmenter.prototype");