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 (_) {} } catch (_) {}
// no error following grow: // no error following grow:
array.fill(0); array.fill(0n);
try { try {
ab.resize(BPE * 3); ab.resize(BPE * 3);
} catch (_) {} } catch (_) {}
// no error following shrink (within bounds): // no error following shrink (within bounds):
array.fill(0); array.fill(0n);
var expectedError; var expectedError;
try { try {
@ -53,7 +53,7 @@ testWithBigIntTypedArrayConstructors(TA => {
} }
assert.throws(expectedError, () => { assert.throws(expectedError, () => {
array.fill(0); array.fill(0n);
throw new Test262Error('fill completed successfully'); throw new Test262Error('fill completed successfully');
}); });
}); });

View File

@ -22,14 +22,14 @@ testWithBigIntTypedArrayConstructors(function(TA) {
var target = new TA(ab); var target = new TA(ab);
var expected = [10, 20, 30, 40]; var expected = [10, 20, 30, 40];
source[0] = 10; source[0] = 10n;
source[1] = 20; source[1] = 20n;
source[2] = 30; source[2] = 30n;
source[3] = 40; source[3] = 40n;
try { try {
ab.resize(BPE * 5); ab.resize(BPE * 5);
expected = [10, 20, 30, 40, 0]; expected = [10n, 20n, 30n, 40n, 0n];
} catch (_) {} } catch (_) {}
target.set(source); target.set(source);
@ -37,7 +37,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
try { try {
ab.resize(BPE * 3); ab.resize(BPE * 3);
expected = [10, 20, 30]; expected = [10n, 20n, 30n];
} catch (_) {} } catch (_) {}
target.set(source); target.set(source);