tc39 / test262

Official ECMAScript Conformance Test Suite
Other
2.31k stars 459 forks source link

RAB: Integrate staging tests for the .reverse method #4160

Closed ioannad closed 1 month ago

ioannad commented 1 month ago

of Array.prototype and TypedArray.prototype

This is part of PR https://github.com/tc39/test262/pull/3888 to make reviewing easier. Includes changes to use the helper ./harness/resizableArrayBufferUtils.js

ioannad commented 1 month ago

I was wondering if there's a possibility to test mid-iteration growing and shrinking. But I think there is not. There's no callback or argument conversion which we could use to resize the ArrayBuffer. There are property accesses on the TypedArray but you cannot redefine numeric property keys on a TypedArray. You could redefine length but that's not mid-iteration, it'd be essentially the same as what we're already testing.

@ptomato do you think we should open an issue to figure out how to write such tests?

ptomato commented 1 month ago

I'm not sure it's possible.