summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArray/prototype
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArray/prototype')
-rw-r--r--test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js6
-rw-r--r--test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js6
-rw-r--r--test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js6
-rw-r--r--test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js6
-rw-r--r--test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js6
-rw-r--r--test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js6
-rw-r--r--test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js5
-rw-r--r--test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js6
-rw-r--r--test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js6
-rw-r--r--test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js2
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js5
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js3
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js4
-rw-r--r--test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js4
-rw-r--r--test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js4
24 files changed, 46 insertions, 67 deletions
diff --git a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
index bca03654b..b5e3a5f02 100644
--- a/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
+++ b/test/built-ins/TypedArray/prototype/entries/BigInt/return-itor.js
@@ -12,10 +12,8 @@ includes: [testBigIntTypedArray.js, compareArray.js]
features: [BigInt, TypedArray]
---*/
-var sample = [0, 42, 64];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var typedArray = new TA(convertToBigInt(sample));
+ var typedArray = new TA([0n, 42n, 64n]);
var itor = typedArray.entries();
var next = itor.next();
diff --git a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
index 12f7d7a6e..74ce8659e 100644
--- a/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/every/BigInt/callbackfn-set-value-during-interaction.js
@@ -27,12 +27,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.every(function(val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -42,7 +42,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
index 2f8bfa008..c87b864f9 100644
--- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
+++ b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-once.js
@@ -17,10 +17,10 @@ features: [BigInt, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA(2);
- var n = 1;
- sample.fill({ valueOf() { return convertToBigInt(n++); } });
+ var n = 1n;
+ sample.fill({ valueOf() { return n++; } });
- assert.sameValue(n, 2, "additional unexpected ToNumber() calls");
+ assert.sameValue(n, 2n, "additional unexpected ToNumber() calls");
assert.sameValue(sample[0], 1n, "incorrect ToNumber result in index 0");
assert.sameValue(sample[1], 1n, "incorrect ToNumber result in index 1");
});
diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
index c8435afa6..dbf09b798 100644
--- a/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-set-value-during-iteration.js
@@ -18,12 +18,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.filter(function(val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -33,7 +33,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during interaction"
);
diff --git a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
index 9d7acf91b..13bd7fb01 100644
--- a/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/forEach/BigInt/callbackfn-set-value-during-interaction.js
@@ -18,12 +18,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.forEach(function(val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -33,7 +33,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js
index e4bc1b0ba..6bccf1c2d 100644
--- a/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js
+++ b/test/built-ins/TypedArray/prototype/keys/BigInt/return-itor.js
@@ -13,10 +13,10 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
-var sample = [0, 42, 64];
+var sample = [0n, 42n, 64n];
testWithBigIntTypedArrayConstructors(function(TA) {
- var typedArray = new TA(convertToBigInt(sample));
+ var typedArray = new TA(sample);
var itor = typedArray.keys();
var next = itor.next();
diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
index 9e140cd82..df41cb459 100644
--- a/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/map/BigInt/callbackfn-set-value-during-interaction.js
@@ -13,12 +13,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.map(function(val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -28,7 +28,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
index 272879dfb..d77a8ebda 100644
--- a/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/reduce/BigInt/callbackfn-set-value-during-iteration.js
@@ -20,12 +20,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.reduce(function(acc, val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
index 7b5fc70c2..3442517c0 100644
--- a/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
+++ b/test/built-ins/TypedArray/prototype/reduceRight/BigInt/callbackfn-set-value-during-iteration.js
@@ -20,12 +20,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.reduceRight(function(acc, val, i) {
if (i < sample.length - 1) {
assert.sameValue(
- sample[i + 1], convertToBigInt(newVal - 1),
+ sample[i + 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -35,7 +35,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
index 8deeed826..d3d5c1aa4 100644
--- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
+++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-type-conversions.js
@@ -35,11 +35,10 @@ testWithBigIntTypedArrayConstructors(function(TA) {
}
};
- // undefined and NaN covered on typedArrayConversions
- var arr = ["1", "", false, true, nullish, obj1, obj2, [], [1]];
+ var arr = [false, true, obj1, [], [1]];
var sample = new TA(arr.length);
- var expected = new TA(convertToBigInt([1, 0, 0, 1, 42, 42, 0, 1]));
+ var expected = new TA([0n, 1n, 42n, 0n, 1n]);
sample.set(arr);
diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js b/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js
index 93b074f1f..092bf2e7d 100644
--- a/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js
+++ b/test/built-ins/TypedArray/prototype/slice/BigInt/set-values-from-different-ctor-type.js
@@ -30,10 +30,10 @@ includes: [testBigIntTypedArray.js, compareArray.js]
features: [BigInt, Symbol.species, TypedArray]
---*/
-var arr = [42, 43, 44];
+var arr = [42n 43n, 44n];
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA(arr);
var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array;
sample.constructor = {};
@@ -41,7 +41,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var result = sample.slice();
- assert(compareArray(result, convertToBigInt(arr)), "values are set");
+ assert(compareArray(result, arr), "values are set");
assert.notSameValue(result.buffer, sample.buffer, "creates a new buffer");
assert.sameValue(result.constructor, other, "used the custom ctor");
});
diff --git a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
index 641b2a0cb..c248960d3 100644
--- a/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
+++ b/test/built-ins/TypedArray/prototype/some/BigInt/callbackfn-set-value-during-interaction.js
@@ -27,12 +27,12 @@ features: [BigInt, Reflect.set, TypedArray]
testWithBigIntTypedArrayConstructors(function(TA) {
var sample = new TA([42n, 43n, 44n]);
- var newVal = 0;
+ var newVal = 0n;
sample.some(function(val, i) {
if (i > 0) {
assert.sameValue(
- sample[i - 1], convertToBigInt(newVal - 1),
+ sample[i - 1], newVal - 1n,
"get the changed value during the loop"
);
assert.sameValue(
@@ -42,7 +42,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
);
}
assert.sameValue(
- Reflect.set(sample, i, convertToBigInt(newVal)),
+ Reflect.set(sample, i, newVal),
true,
"set value during iteration"
);
diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
index 50d6e22fe..57b491551 100644
--- a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
+++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js
@@ -26,7 +26,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample = new TA([3n, 4n, 3n, 1n, 0n, 1n, 2n]).sort();
assert(compareArray(sample, [0n, 1n, 1n, 2n, 3n, 3n, 4n]), "repeating numbers");
- sample = new TA(convertToBigInt([1, 0, -0, 2])).sort();
+ sample = new TA([1n, 0n, -0n, 2n]).sort();
assert(compareArray(sample, [0n, 0n, 1n, 2n]), "0s");
});
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js
index c40f36561..82cd346b9 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tolocalestring-from-each-value.js
@@ -39,15 +39,14 @@ BigInt.prototype.toLocaleString = function() {
return "hacks" + calls.length;
};
-var arr = [42, 0];
var expected = ["hacks1", "hacks2"].join(separator);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = [];
assert.sameValue(sample.toLocaleString(), expected, "returns expected value");
assert(
- compareArray(new TA(convertToBigInt(calls)), sample),
+ compareArray(new TA(calls), sample),
"toLocaleString called for each item"
);
});
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js
index 9a9fe93d0..7fb9d6393 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-tostring-from-each-value.js
@@ -47,11 +47,11 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
+var arr = [42n, 0n];
var expected = ["hacks1", "hacks2"].join(separator);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA(arr);
calls = 0;
assert.sameValue(sample.toLocaleString(), expected, "returns expected value");
assert.sameValue(calls, 2, "toString called once for each item");
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js
index b01c60feb..ea5464d98 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/calls-valueof-from-each-value.js
@@ -45,11 +45,10 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
var expected = ["hacks1", "hacks2"].join(separator);
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = 0;
assert.sameValue(sample.toLocaleString(), expected, "returns expected value");
assert.sameValue(calls, 2, "valueOf called once for each item");
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js
index 378b4e5b8..e018468cc 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tolocalestring.js
@@ -31,11 +31,9 @@ BigInt.prototype.toLocaleString = function() {
throw new Test262Error();
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
calls = 0;
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
assert.throws(Test262Error, function() {
sample.toLocaleString();
});
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js
index 3398b29ef..058f684c3 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-tostring.js
@@ -43,10 +43,8 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = 0;
assert.throws(Test262Error, function() {
sample.toLocaleString();
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js
index fceea34ef..96259ba5d 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-firstelement-valueof.js
@@ -44,10 +44,8 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = 0;
assert.throws(Test262Error, function() {
sample.toLocaleString();
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js
index 1bac9b691..987146990 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tolocalestring.js
@@ -34,11 +34,9 @@ BigInt.prototype.toLocaleString = function() {
}
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
calls = 0;
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
assert.throws(Test262Error, function() {
sample.toLocaleString();
});
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js
index 3c45b81c1..cc0bd5ee6 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-tostring.js
@@ -45,10 +45,8 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = 0;
assert.throws(Test262Error, function() {
sample.toLocaleString();
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js
index f683ad285..152095ebe 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-abrupt-from-nextelement-valueof.js
@@ -46,10 +46,8 @@ BigInt.prototype.toLocaleString = function() {
};
};
-var arr = [42, 0];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n]);
calls = 0;
assert.throws(Test262Error, function() {
sample.toLocaleString();
diff --git a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js
index c3588c70f..99772306f 100644
--- a/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js
+++ b/test/built-ins/TypedArray/prototype/toLocaleString/BigInt/return-result.js
@@ -33,10 +33,8 @@ features: [BigInt, TypedArray]
var separator = ["", ""].toLocaleString();
-var arr = [42, 0, 43];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var sample = new TA(convertToBigInt(arr));
+ var sample = new TA([42n, 0n, 43n]);
var expected =
sample[0].toLocaleString().toString() +
separator +
diff --git a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
index dc2904754..3924cb3b4 100644
--- a/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
+++ b/test/built-ins/TypedArray/prototype/values/BigInt/return-itor.js
@@ -13,10 +13,8 @@ includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
-var sample = [0, 42, 64];
-
testWithBigIntTypedArrayConstructors(function(TA) {
- var typedArray = new TA(convertToBigInt(sample));
+ var typedArray = new TA([0n, 42n, 64n]);
var itor = typedArray.values();
var next = itor.next();