New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAB: Integrate staging tests for the .every method #4074
base: main
Are you sure you want to change the base?
Conversation
of Array.prototype and TypedArray.prototype This is part of PR tc39#3888 to make reviewing easier. Includes changes to use the helper ./harness/resizableArrayBufferUtils.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the original PR have any tests for every()
on resizable buffers that don't shrink or grow? Most of the other PRs have had these tests.
let values; | ||
let rab; | ||
let resizeAfter; | ||
let resizeTo; | ||
for (let ctor of ctors) { | ||
rab = CreateRabForTest(ctor); | ||
const fixedLength = new ctor(rab, 0, 4); | ||
values = []; | ||
resizeAfter = 2; | ||
resizeTo = 5 * ctor.BYTES_PER_ELEMENT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to scope these values inside the loops, to prevent accidental contamination. It doesn't look like they need to be shared between the loops.
let values; | |
let rab; | |
let resizeAfter; | |
let resizeTo; | |
for (let ctor of ctors) { | |
rab = CreateRabForTest(ctor); | |
const fixedLength = new ctor(rab, 0, 4); | |
values = []; | |
resizeAfter = 2; | |
resizeTo = 5 * ctor.BYTES_PER_ELEMENT; | |
for (let ctor of ctors) { | |
const rab = CreateRabForTest(ctor); | |
const fixedLength = new ctor(rab, 0, 4); | |
const values = []; | |
const resizeAfter = 2; | |
const resizeTo = 3 * ctor.BYTES_PER_ELEMENT; |
of Array.prototype and TypedArray.prototype
This is part of PR #3888 to make reviewing easier. Includes changes to use the helper ./harness/resizableArrayBufferUtils.js