summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArrays/from/BigInt
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArrays/from/BigInt')
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js2
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-using-custom-ctor.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-with-mapfn.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/new-instance-without-mapfn.js6
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js2
8 files changed, 16 insertions, 16 deletions
diff --git a/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
index 14f59cfd4..b2102fe1b 100644
--- a/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
+++ b/test/built-ins/TypedArrays/from/BigInt/custom-ctor-returns-other-instance.js
@@ -24,10 +24,10 @@ features: [BigInt, Symbol.iterator, TypedArray]
---*/
testWithBigIntTypedArrayConstructors(function(TA) {
- var sourceItor = convertToBigInt([1, 2]);
+ var sourceItor = [1n, 2n];
var sourceObj = {
- 0: convertToBigInt(0),
- 1: convertToBigInt(0),
+ 0: 0n,
+ 1: 0n,
length: 2
};
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
index a84021d47..d39985829 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-arguments.js
@@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
k: k,
argsLength: arguments.length
});
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn);
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
index b748126af..24eebdf81 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-with-thisarg.js
@@ -26,7 +26,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var results = [];
var mapfn = function() {
results.push(this);
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn, thisArg);
diff --git a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
index 9b575c2a9..f8f0b282f 100644
--- a/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
+++ b/test/built-ins/TypedArrays/from/BigInt/mapfn-this-without-thisarg-strict.js
@@ -26,7 +26,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var results = [];
var mapfn = function() {
results.push(this);
- return convertToBigInt(0);
+ return 0n;
};
TA.from(source, mapfn);
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 7e6bc6169..82a37b242 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
@@ -21,9 +21,9 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from.call(ctor, convertToBigInt(source));
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(42));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 42n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
assert.sameValue(called, 1);
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 48ee4d285..7de5fda26 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
@@ -17,9 +17,9 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from(source, mapfn);
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(84));
- assert.sameValue(result[1], convertToBigInt(86));
- assert.sameValue(result[2], convertToBigInt(84));
+ assert.sameValue(result[0], 84n);
+ assert.sameValue(result[1], 86n);
+ assert.sameValue(result[2], 84n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
});
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 af95e8015..61f45e35e 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
@@ -13,9 +13,9 @@ var source = [42, 43, 42];
testWithBigIntTypedArrayConstructors(function(TA) {
var result = TA.from(convertToBigInt(source));
assert.sameValue(result.length, 3);
- assert.sameValue(result[0], convertToBigInt(42));
- assert.sameValue(result[1], convertToBigInt(43));
- assert.sameValue(result[2], convertToBigInt(42));
+ assert.sameValue(result[0], 42n);
+ assert.sameValue(result[1], 43n);
+ assert.sameValue(result[2], 42n);
assert.sameValue(result.constructor, TA);
assert.sameValue(Object.getPrototypeOf(result), TA.prototype);
});
diff --git a/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js b/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
index 34ee679a5..7259e8a03 100644
--- a/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
+++ b/test/built-ins/TypedArrays/from/BigInt/set-value-abrupt-completion.js
@@ -26,7 +26,7 @@ var obj = {
};
testWithBigIntTypedArrayConstructors(function(TA) {
- var source = [convertToBigInt(42), obj, convertToBigInt(1)];
+ var source = [42n, obj, 1n];
var lastValue;
var mapfn = function(kValue) {
lastValue = kValue;