mirror of https://github.com/tc39/test262.git
Correct mistakes in support of proposal change
Ensure that when the ArrayBuffer of a length-tracking TypedArray is resized to the address matching the TypedArray's byte offset, the TypedArray is *not* considered "out of bounds."
This commit is contained in:
parent
94500e1de9
commit
1b72bcd857
|
@ -34,13 +34,17 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)");
|
||||
|
||||
var expected;
|
||||
try {
|
||||
ab.resize(BPE);
|
||||
} catch (_) {}
|
||||
|
||||
assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)");
|
||||
|
||||
var expected = BPE;
|
||||
try {
|
||||
ab.resize(0);
|
||||
expected = 0;
|
||||
} catch (_) {
|
||||
expected = BPE;
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)");
|
||||
});
|
||||
|
|
|
@ -34,14 +34,13 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
|
||||
assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)");
|
||||
|
||||
var expected = BPE;
|
||||
try {
|
||||
ab.resize(BPE);
|
||||
expected = 0;
|
||||
} catch (_) {}
|
||||
|
||||
assert.sameValue(array.byteOffset, expected, "following shrink (on boundary)");
|
||||
assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)");
|
||||
|
||||
var expected = BPE;
|
||||
try {
|
||||
ab.resize(0);
|
||||
expected = 0;
|
||||
|
|
Loading…
Reference in New Issue