diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2018-03-06 15:14:11 -0500 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2018-03-06 15:14:11 -0500 |
commit | ce9419779fc61d5cdfa37a5cda7b6828c67221da (patch) | |
tree | 05407fc0a17c7ee2762e85ef7638b80bedc711ae | |
parent | ac55e29ed061a38043c61d48f198eb15509a6d62 (diff) | |
download | qtdeclarative-testsuites-ce9419779fc61d5cdfa37a5cda7b6828c67221da.tar.gz |
typed-arrays/bigint: fixes per recommendation. (#1473)
Fixes gh-1467
4 files changed, 6 insertions, 21 deletions
diff --git a/test/built-ins/BigInt/prototype/Symbol.toStringTag.js b/test/built-ins/BigInt/prototype/Symbol.toStringTag.js index 146369719..ab55f2125 100644 --- a/test/built-ins/BigInt/prototype/Symbol.toStringTag.js +++ b/test/built-ins/BigInt/prototype/Symbol.toStringTag.js @@ -20,18 +20,3 @@ verifyProperty(BigInt.prototype, Symbol.toStringTag, { enumerable: false, configurable: true }); - -assert.sameValue(Object.prototype.toString.call(3n), "[object BigInt]"); -assert.sameValue(Object.prototype.toString.call(Object(3n)), "[object BigInt]"); - -// Verify that Object.prototype.toString does not have special casing for BigInt -// as it does for most other primitive types -Object.defineProperty(BigInt.prototype, Symbol.toStringTag, { - value: "FooBar", - writable: false, - enumerable: false, - configurable: true -}); - -assert.sameValue(Object.prototype.toString.call(3n), "[object FooBar]"); -assert.sameValue(Object.prototype.toString.call(Object(3n)), "[object FooBar]"); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/custom-proto-access-throws.js index ab89da072..7e45acea1 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/custom-proto-access-throws.js @@ -38,7 +38,7 @@ Object.defineProperty(newTarget, "prototype", { } }); -var sample = new Int8Array(); +var sample = new BigInt64Array(); testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/detached-when-species-retrieved-different-type.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/detached-when-species-retrieved-different-type.js index c5de19602..4b914e6d2 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/detached-when-species-retrieved-different-type.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/detached-when-species-retrieved-different-type.js @@ -52,7 +52,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ta.buffer.constructor = bufferConstructor; assert.throws(TypeError, function() { - var targetType = TA !== Int32Array ? Int32Array : Uint32Array; + var targetType = TA !== BigInt64Array ? BigInt64Array : BigUint64Array; new targetType(ta); }, "TypeError thrown for detached source buffer"); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js index 754abcd42..c29b53566 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/other-ctor-returns-new-typedarray.js @@ -2,20 +2,20 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-typedarray-typedarray -description: > - Return abrupt from getting typedArray argument's buffer.constructor.@@species +description: Instantiate a new TypedArray with an existing TypedArray info: | 22.2.4.3 TypedArray ( typedArray ) This description applies only if the TypedArray function is called with at least one argument and the Type of the first argument is Object and that object has a [[TypedArrayName]] internal slot. + includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -var sample1 = new BigInt64Array(); -var sample2 = new BigUint64Array(); +var sample1 = new BigInt64Array(7); +var sample2 = new BigUint64Array(7); testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === BigInt64Array ? sample2 : sample1; |