mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
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)");
|
assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)");
|
||||||
|
|
||||||
var expected;
|
|
||||||
try {
|
try {
|
||||||
ab.resize(BPE);
|
ab.resize(BPE);
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)");
|
||||||
|
|
||||||
|
var expected = BPE;
|
||||||
|
try {
|
||||||
|
ab.resize(0);
|
||||||
expected = 0;
|
expected = 0;
|
||||||
} catch (_) {
|
} catch (_) {}
|
||||||
expected = BPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert.sameValue(array.byteOffset, expected, "following shrink (out of bounds)");
|
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)");
|
assert.sameValue(array.byteOffset, BPE, "following shrink (within bounds)");
|
||||||
|
|
||||||
var expected = BPE;
|
|
||||||
try {
|
try {
|
||||||
ab.resize(BPE);
|
ab.resize(BPE);
|
||||||
expected = 0;
|
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
assert.sameValue(array.byteOffset, expected, "following shrink (on boundary)");
|
assert.sameValue(array.byteOffset, BPE, "following shrink (on boundary)");
|
||||||
|
|
||||||
|
var expected = BPE;
|
||||||
try {
|
try {
|
||||||
ab.resize(0);
|
ab.resize(0);
|
||||||
expected = 0;
|
expected = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user