mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Correct arguments for BigInt-accepting methods
This commit is contained in:
parent
5fee61c9e8
commit
741db35b65
@ -29,14 +29,14 @@ testWithBigIntTypedArrayConstructors(TA => {
|
||||
} catch (_) {}
|
||||
|
||||
// no error following grow:
|
||||
array.fill(0);
|
||||
array.fill(0n);
|
||||
|
||||
try {
|
||||
ab.resize(BPE * 3);
|
||||
} catch (_) {}
|
||||
|
||||
// no error following shrink (within bounds):
|
||||
array.fill(0);
|
||||
array.fill(0n);
|
||||
|
||||
var expectedError;
|
||||
try {
|
||||
@ -53,7 +53,7 @@ testWithBigIntTypedArrayConstructors(TA => {
|
||||
}
|
||||
|
||||
assert.throws(expectedError, () => {
|
||||
array.fill(0);
|
||||
array.fill(0n);
|
||||
throw new Test262Error('fill completed successfully');
|
||||
});
|
||||
});
|
||||
|
@ -22,14 +22,14 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
var target = new TA(ab);
|
||||
var expected = [10, 20, 30, 40];
|
||||
|
||||
source[0] = 10;
|
||||
source[1] = 20;
|
||||
source[2] = 30;
|
||||
source[3] = 40;
|
||||
source[0] = 10n;
|
||||
source[1] = 20n;
|
||||
source[2] = 30n;
|
||||
source[3] = 40n;
|
||||
|
||||
try {
|
||||
ab.resize(BPE * 5);
|
||||
expected = [10, 20, 30, 40, 0];
|
||||
expected = [10n, 20n, 30n, 40n, 0n];
|
||||
} catch (_) {}
|
||||
|
||||
target.set(source);
|
||||
@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
|
||||
try {
|
||||
ab.resize(BPE * 3);
|
||||
expected = [10, 20, 30];
|
||||
expected = [10n, 20n, 30n];
|
||||
} catch (_) {}
|
||||
|
||||
target.set(source);
|
||||
|
Loading…
x
Reference in New Issue
Block a user