diff --git a/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js b/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js index 1d3e595cd3..2c47d6884b 100644 --- a/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js +++ b/test/built-ins/Array/prototype/flat/non-object-ctor-throws.js @@ -8,6 +8,8 @@ description: > features: [Array.prototype.flat] ---*/ +assert.sameValue(typeof Array.prototype.flat, 'function'); + var a = []; a.constructor = null; assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js b/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js index ee590d27a1..807826e1bf 100644 --- a/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js +++ b/test/built-ins/Array/prototype/flat/null-undefined-input-throws.js @@ -7,6 +7,8 @@ description: > features: [Array.prototype.flat] ---*/ +assert.sameValue(typeof Array.prototype.flat, 'function'); + assert.throws(TypeError, function() { [].flat.call(null); }, 'null value'); diff --git a/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js b/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js index a631efb34d..6df3a3bd85 100644 --- a/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js +++ b/test/built-ins/Array/prototype/flat/symbol-object-create-null-depth-throws.js @@ -7,6 +7,8 @@ description: > features: [Array.prototype.flat] ---*/ +assert.sameValue(typeof Array.prototype.flat, 'function'); + assert.throws(TypeError, function() { [].flat(Symbol()); }, 'symbol value'); diff --git a/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js b/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js index ab0f8ca86d..aee6e4b6c0 100644 --- a/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js +++ b/test/built-ins/Array/prototype/flatMap/non-callable-argument-throws.js @@ -7,6 +7,8 @@ description: > features: [Array.prototype.flatMap] ---*/ +assert(Array.prototype.flatMap); + assert.throws(TypeError, function() { [].flatMap({}); }, 'non callable argument'); diff --git a/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js b/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js index b54e27746a..39cc66e97d 100644 --- a/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js +++ b/test/built-ins/Array/prototype/flatMap/non-object-ctor-throws.js @@ -8,6 +8,8 @@ description: > features: [Array.prototype.flatMap] ---*/ +assert.sameValue(typeof Array.prototype.flatMap, 'function'); + var a = []; a.constructor = null; assert.throws(TypeError, function() { diff --git a/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js b/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js index dcfe81aaf4..44630d9644 100644 --- a/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js +++ b/test/built-ins/Array/prototype/flatMap/null-undefined-input-throws.js @@ -7,6 +7,8 @@ description: > features: [Array.prototype.flatMap] ---*/ +assert.sameValue(typeof Array.prototype.flatMap, 'function'); + assert.throws(TypeError, function() { [].flatMap.call(null); }, 'null value'); diff --git a/test/built-ins/Array/prototype/flatMap/proxy-access-count.js b/test/built-ins/Array/prototype/flatMap/proxy-access-count.js index 8b33348c69..4e7edbd689 100644 --- a/test/built-ins/Array/prototype/flatMap/proxy-access-count.js +++ b/test/built-ins/Array/prototype/flatMap/proxy-access-count.js @@ -17,10 +17,12 @@ info: | b. Let exists be ? HasProperty(source, P). c. If exists is true, then i. Let element be ? Get(source, P). -features: [Array.prototype.flat] +features: [Array.prototype.flatMap] includes: [compareArray.js] ---*/ +assert.sameValue(typeof Array.prototype.flatMap, 'function'); + const getCalls = [], hasCalls = []; const handler = { get : function (t, p, r) { getCalls.push(p); return Reflect.get(t, p, r); }, diff --git a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js index 950cda9f6e..949f74a98c 100644 --- a/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asIntN/bigint-tobigint-errors.js @@ -9,7 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ - +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); assert.throws(TypeError, function() { BigInt.asIntN(0, undefined); }, "ToBigInt: undefined => TypeError"); diff --git a/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js b/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js index fe0a702faf..d1286832e5 100644 --- a/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js +++ b/test/built-ins/BigInt/asIntN/bigint-tobigint-toprimitive.js @@ -9,7 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ - +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); function err() { throw new Test262Error(); } diff --git a/test/built-ins/BigInt/asIntN/bits-toindex-errors.js b/test/built-ins/BigInt/asIntN/bits-toindex-errors.js index 9f2fabb1c1..b0999053ed 100644 --- a/test/built-ins/BigInt/asIntN/bits-toindex-errors.js +++ b/test/built-ins/BigInt/asIntN/bits-toindex-errors.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); assert.throws(RangeError, function() { BigInt.asIntN(-1, 0n); diff --git a/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js b/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js index 10ffd610f8..584f461669 100644 --- a/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js +++ b/test/built-ins/BigInt/asIntN/bits-toindex-toprimitive.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asIntN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js index 924e3decb1..d12d665f2d 100644 --- a/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js +++ b/test/built-ins/BigInt/asUintN/bigint-tobigint-errors.js @@ -9,6 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); assert.throws(TypeError, function() { BigInt.asUintN(0, undefined); diff --git a/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js b/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js index 1aff2080c3..e1508cf16f 100644 --- a/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js +++ b/test/built-ins/BigInt/asUintN/bigint-tobigint-toprimitive.js @@ -9,6 +9,8 @@ info: | 2. Let bigint ? ToBigInt(bigint). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/asUintN/bits-toindex-errors.js b/test/built-ins/BigInt/asUintN/bits-toindex-errors.js index 3967dab25d..4bc2553271 100644 --- a/test/built-ins/BigInt/asUintN/bits-toindex-errors.js +++ b/test/built-ins/BigInt/asUintN/bits-toindex-errors.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); assert.throws(RangeError, function() { BigInt.asUintN(-1, 0n); diff --git a/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js b/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js index 4933da2fbf..a7499c9d80 100644 --- a/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js +++ b/test/built-ins/BigInt/asUintN/bits-toindex-toprimitive.js @@ -9,6 +9,8 @@ info: | 1. Let bits be ? ToIndex(bits). features: [BigInt, computed-property-names, Symbol, Symbol.toPrimitive] ---*/ +assert.sameValue(typeof BigInt, 'function'); +assert.sameValue(typeof BigInt.asUintN, 'function'); function err() { throw new Test262Error(); diff --git a/test/built-ins/BigInt/new-target-throws.js b/test/built-ins/BigInt/new-target-throws.js index aaf91b1174..c61ef6e2b2 100644 --- a/test/built-ins/BigInt/new-target-throws.js +++ b/test/built-ins/BigInt/new-target-throws.js @@ -9,6 +9,7 @@ info: | ... features: [BigInt] ---*/ +assert.sameValue(typeof BigInt, 'function'); assert.throws(TypeError, function() { new BigInt(); diff --git a/test/built-ins/BigInt/prototype/toString/prototype-call.js b/test/built-ins/BigInt/prototype/toString/prototype-call.js index 76aa2195de..b9a4d0ad70 100644 --- a/test/built-ins/BigInt/prototype/toString/prototype-call.js +++ b/test/built-ins/BigInt/prototype/toString/prototype-call.js @@ -15,6 +15,7 @@ info: | [[BigIntData]] internal slot. features: [BigInt] ---*/ +assert.sameValue(typeof BigInt, 'function'); assert.throws(TypeError, function() { BigInt.prototype.toString(1); diff --git a/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js b/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js index 1e4a1bd6b2..2ac6dde7dc 100644 --- a/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js +++ b/test/built-ins/BigInt/prototype/toString/thisbigintvalue-not-valid-throws.js @@ -21,6 +21,8 @@ features: [BigInt, Symbol, Symbol.toPrimitive] var toString = BigInt.prototype.toString; +assert.sameValue(typeof toString, 'function'); + assert.throws(TypeError, function() { toString.call({ x: 1n diff --git a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js index 90c5b71c18..88f9f40b62 100644 --- a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js +++ b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-object-throws.js @@ -20,6 +20,7 @@ features: [BigInt] ---*/ var valueOf = BigInt.prototype.valueOf; +assert.sameValue(typeof valueOf, 'function'); assert.throws(TypeError, function() { valueOf.call({}); diff --git a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js index c7379385c7..9d2a1e13ed 100644 --- a/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js +++ b/test/built-ins/BigInt/prototype/valueOf/this-value-invalid-primitive-throws.js @@ -21,6 +21,8 @@ features: [BigInt, Symbol] var valueOf = BigInt.prototype.valueOf; +assert.sameValue(typeof valueOf, 'function'); + assert.throws(TypeError, function() { valueOf.call(undefined); }, "undefined"); diff --git a/test/built-ins/Object/fromEntries/iterator-closed-for-null-entry.js b/test/built-ins/Object/fromEntries/iterator-closed-for-null-entry.js index 6907a65cad..ec4bd3fefd 100644 --- a/test/built-ins/Object/fromEntries/iterator-closed-for-null-entry.js +++ b/test/built-ins/Object/fromEntries/iterator-closed-for-null-entry.js @@ -49,6 +49,7 @@ var iterable = { }, }; +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(iterable); }); diff --git a/test/built-ins/Object/fromEntries/iterator-closed-for-string-entry.js b/test/built-ins/Object/fromEntries/iterator-closed-for-string-entry.js index 81a27e0731..1910005bd7 100644 --- a/test/built-ins/Object/fromEntries/iterator-closed-for-string-entry.js +++ b/test/built-ins/Object/fromEntries/iterator-closed-for-string-entry.js @@ -49,6 +49,7 @@ var iterable = { }, }; +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(iterable); }); diff --git a/test/built-ins/Object/fromEntries/iterator-not-closed-for-next-returning-non-object.js b/test/built-ins/Object/fromEntries/iterator-not-closed-for-next-returning-non-object.js index fba4fbe67e..0af8935bf1 100644 --- a/test/built-ins/Object/fromEntries/iterator-not-closed-for-next-returning-non-object.js +++ b/test/built-ins/Object/fromEntries/iterator-not-closed-for-next-returning-non-object.js @@ -45,6 +45,7 @@ var iterable = { }, }; +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(iterable); }); diff --git a/test/built-ins/Object/fromEntries/iterator-not-closed-for-uncallable-next.js b/test/built-ins/Object/fromEntries/iterator-not-closed-for-uncallable-next.js index 74ad7a739c..aca63b824d 100644 --- a/test/built-ins/Object/fromEntries/iterator-not-closed-for-uncallable-next.js +++ b/test/built-ins/Object/fromEntries/iterator-not-closed-for-uncallable-next.js @@ -36,6 +36,7 @@ var iterable = { }, }; +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(iterable); }); diff --git a/test/built-ins/Object/fromEntries/requires-argument.js b/test/built-ins/Object/fromEntries/requires-argument.js index 19b91a5307..850a6bc4ea 100644 --- a/test/built-ins/Object/fromEntries/requires-argument.js +++ b/test/built-ins/Object/fromEntries/requires-argument.js @@ -14,6 +14,7 @@ info: | features: [Object.fromEntries] ---*/ +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(); }); diff --git a/test/built-ins/Object/fromEntries/string-entry-primitive-throws.js b/test/built-ins/Object/fromEntries/string-entry-primitive-throws.js index 2a678e3d8a..09dcf75894 100644 --- a/test/built-ins/Object/fromEntries/string-entry-primitive-throws.js +++ b/test/built-ins/Object/fromEntries/string-entry-primitive-throws.js @@ -7,6 +7,7 @@ esid: sec-object.fromentries features: [Object.fromEntries] ---*/ +assert.sameValue(typeof Object.fromEntries, 'function'); assert.throws(TypeError, function() { Object.fromEntries(['ab']); }); diff --git a/test/built-ins/Promise/prototype/finally/this-value-non-object.js b/test/built-ins/Promise/prototype/finally/this-value-non-object.js index 1e8467b9b8..d88a70a0be 100644 --- a/test/built-ins/Promise/prototype/finally/this-value-non-object.js +++ b/test/built-ins/Promise/prototype/finally/this-value-non-object.js @@ -8,6 +8,8 @@ esid: sec-promise.prototype.finally features: [Promise.prototype.finally] ---*/ +assert.sameValue(typeof Promise.prototype.finally, 'function'); + assert.throws(TypeError, function() { Promise.prototype.finally.call(undefined); }, 'undefined'); diff --git a/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js b/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js index 253e22fe38..5ba20e2253 100644 --- a/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js +++ b/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js @@ -8,6 +8,7 @@ description: > esid: sec-promise.prototype.finally features: [Symbol, Promise.prototype.finally] ---*/ +assert.sameValue(typeof Promise.prototype.finally, 'function'); var symbol = Symbol(); diff --git a/test/built-ins/String/prototype/trimEnd/this-value-object-toprimitive-returns-object-err.js b/test/built-ins/String/prototype/trimEnd/this-value-object-toprimitive-returns-object-err.js index a40d97ba89..a9c572b024 100644 --- a/test/built-ins/String/prototype/trimEnd/this-value-object-toprimitive-returns-object-err.js +++ b/test/built-ins/String/prototype/trimEnd/this-value-object-toprimitive-returns-object-err.js @@ -33,6 +33,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimEnd, 'function'); assert.throws(TypeError, function() { String.prototype.trimEnd.call(thisVal); }); diff --git a/test/built-ins/String/prototype/trimEnd/this-value-object-tostring-returns-object-err.js b/test/built-ins/String/prototype/trimEnd/this-value-object-tostring-returns-object-err.js index 2b4ed6006d..beb2296fe6 100644 --- a/test/built-ins/String/prototype/trimEnd/this-value-object-tostring-returns-object-err.js +++ b/test/built-ins/String/prototype/trimEnd/this-value-object-tostring-returns-object-err.js @@ -51,6 +51,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimEnd, 'function'); assert.throws(TypeError, function() { String.prototype.trimEnd.call(thisVal); }); diff --git a/test/built-ins/String/prototype/trimEnd/this-value-object-valueof-returns-object-err.js b/test/built-ins/String/prototype/trimEnd/this-value-object-valueof-returns-object-err.js index 20a8273150..36b182eeb5 100644 --- a/test/built-ins/String/prototype/trimEnd/this-value-object-valueof-returns-object-err.js +++ b/test/built-ins/String/prototype/trimEnd/this-value-object-valueof-returns-object-err.js @@ -52,6 +52,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimEnd, 'function'); assert.throws(TypeError, function() { String.prototype.trimEnd.call(thisVal); }); diff --git a/test/built-ins/String/prototype/trimStart/this-value-object-toprimitive-returns-object-err.js b/test/built-ins/String/prototype/trimStart/this-value-object-toprimitive-returns-object-err.js index a5e0bf976f..d24157432d 100644 --- a/test/built-ins/String/prototype/trimStart/this-value-object-toprimitive-returns-object-err.js +++ b/test/built-ins/String/prototype/trimStart/this-value-object-toprimitive-returns-object-err.js @@ -33,6 +33,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimStart, 'function'); assert.throws(TypeError, function() { String.prototype.trimStart.call(thisVal); }); diff --git a/test/built-ins/String/prototype/trimStart/this-value-object-tostring-returns-object-err.js b/test/built-ins/String/prototype/trimStart/this-value-object-tostring-returns-object-err.js index 30ee4c7511..9c4377a815 100644 --- a/test/built-ins/String/prototype/trimStart/this-value-object-tostring-returns-object-err.js +++ b/test/built-ins/String/prototype/trimStart/this-value-object-tostring-returns-object-err.js @@ -51,6 +51,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimStart, 'function'); assert.throws(TypeError, function() { String.prototype.trimStart.call(thisVal); }); diff --git a/test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js b/test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js index 85cced2dca..77c184aca5 100644 --- a/test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js +++ b/test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js @@ -52,6 +52,7 @@ var thisVal = { }, }; +assert.sameValue(typeof String.prototype.trimStart, 'function'); assert.throws(TypeError, function() { String.prototype.trimStart.call(thisVal); }); diff --git a/test/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js b/test/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js index 0e3269c48f..141d825120 100644 --- a/test/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js +++ b/test/built-ins/TypedArrayConstructors/BigInt64Array/prototype/not-typedarray-object.js @@ -12,7 +12,7 @@ info: | are specific to TypedArray instance objects. features: [BigInt] ---*/ - +assert.sameValue(typeof BigInt64Array, 'function'); assert.throws(TypeError, function () { BigInt64Array.prototype.buffer; }); diff --git a/test/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js b/test/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js index aabe797e72..7629f46417 100644 --- a/test/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js +++ b/test/built-ins/TypedArrayConstructors/BigUint64Array/prototype/not-typedarray-object.js @@ -12,7 +12,7 @@ info: | are specific to TypedArray instance objects. features: [BigInt] ---*/ - +assert.sameValue(typeof BigUint64Array, 'function'); assert.throws(TypeError, function () { BigUint64Array.prototype.buffer; }); diff --git a/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js b/test/intl402/ListFormat/constructor/constructor/newtarget-undefined.js index 635ea414c6..8edb28f203 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 7f1dfd085c..1933e50b09 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 d232474165..23e8aa670b 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 0ed866288d..4d1af02eb7 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 fbf3616c10..852ba562d0 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 83c6e28c31..2605eb0864 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 41f42e692a..97dd903485 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 25d85a5758..2eb14d3dab 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 5b6384bd06..1e6a76cb51 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 8dddd83b90..d8f4a75e4c 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 d654275554..d15513afbe 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 fd547383a5..dd90301b27 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 462398b601..742dab1f31 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 24d5a7bad6..b596e8e121 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 d344285d92..29f40d23e6 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");