Correct arguments for BigInt-accepting methods

This commit is contained in:
Mike Pennisi 2021-09-23 19:58:27 -04:00 committed by Rick Waldron
parent 5fee61c9e8
commit 741db35b65
2 changed files with 9 additions and 9 deletions

View File

@ -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');
});
});

View File

@ -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);