diff options
Diffstat (limited to 'test/built-ins/TypedArrays/from')
4 files changed, 6 insertions, 13 deletions
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-non-strict.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-non-strict.js index b16d6f9cc..410c3244d 100644 --- a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-non-strict.js +++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-non-strict.js @@ -20,17 +20,16 @@ flags: [noStrict] features: [BigInt, TypedArray] ---*/ -var source = [42, 43]; var global = this; testWithBigIntTypedArrayConstructors(function(TA) { var results = []; var mapfn = function(x) { results.push(this); - return convertToBigInt(x); + return x; }; - TA.from(convertToBigInt(source), mapfn); + TA.from([42n, 43n], mapfn); assert.sameValue(results.length, 2); assert.sameValue(results[0], global); diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js index 82a37b242..cd012fc88 100644 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js @@ -8,8 +8,6 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -var source = [42, 43, 42]; - testWithBigIntTypedArrayConstructors(function(TA) { var called = 0; @@ -19,7 +17,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { return new TA(len); }; - var result = TA.from.call(ctor, convertToBigInt(source)); + var result = TA.from.call(ctor, [42n, 43n, 42n]); assert.sameValue(result.length, 3); assert.sameValue(result[0], 42n); assert.sameValue(result[1], 43n); diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js index 7de5fda26..600bf2a1f 100644 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js +++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js @@ -8,14 +8,12 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -var source = [42, 43, 42]; - testWithBigIntTypedArrayConstructors(function(TA) { var mapfn = function(kValue) { - return convertToBigInt(kValue * 2); + return kValue * 2n; }; - var result = TA.from(source, mapfn); + var result = TA.from([42n, 43n, 42n], mapfn); assert.sameValue(result.length, 3); assert.sameValue(result[0], 84n); assert.sameValue(result[1], 86n); diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js index 61f45e35e..1243cb6aa 100644 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js +++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js @@ -8,10 +8,8 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -var source = [42, 43, 42]; - testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from(convertToBigInt(source)); + var result = TA.from([42n, 43n, 42n]); assert.sameValue(result.length, 3); assert.sameValue(result[0], 42n); assert.sameValue(result[1], 43n); |