[immutable-arraybuffer] TypedArray internal operations#4551
Conversation
55e9cb7 to
795f516
Compare
| var value1 = sample[1]; | ||
| assert.compareArray([String(value0), String(value1)], ["42", "43"]); | ||
|
|
||
| verifyProperty(sample, "0", { |
There was a problem hiding this comment.
Note that verifyProperty() is based on various assumptions that don't work for typed arrays. For example, isWritable(new Uint8Array(8), "0") is false (incorrectly) and isWritable(new BigInt64Array(8), "0") even results in SyntaxError: Cannot convert unlikelyValue to a BigInt.
The current version of the test seems to be lucky to pass despite the usage of verifyProperty(), but it is probably better to avoid it (for typed arrays). Note that, for example, index-prop-desc.js that is kind of mutable version of this test avoids verifyProperty() for the mentioned reasons.
There was a problem hiding this comment.
I just fixed verifyProperty to work with TypedArray input.
| includes: [testTypedArray.js, compareArray.js, propertyHelper.js] | ||
| ---*/ | ||
|
|
||
| testWithAllTypedArrayConstructors(function(TA, makeCtorArg) { |
There was a problem hiding this comment.
Other tests in the same directory do not test BigInt typed arrays i.e. use testWithTypedArrayConstructors instead of testWithAllTypedArrayConstructors (and contain a variant with testWithBigIntTypedArrayConstructors in BigInt sub-directory).
There was a problem hiding this comment.
Right, in the long term I'll be removing the "bigint" sub-directories to make the testing more consolidated.
795f516 to
0fa24b7
Compare
0fa24b7 to
c8acdac
Compare
|
Needs a non-trivial rebase. |
…rray method tests
…perties cannot be set when the backing buffer is immutable
…es are non-configurable and non-writable when the backing buffer is immutable
…es being defined are validated against descriptors for immutable properties
c8acdac to
3be710d
Compare
Done. |
Ref #4509
Most of the changes just relax filters applied to
testWithTypedArrayConstructorsand similar harness/testTypedArray.js exports such that immutable ArrayBuffers are no longer excluded.