Added test cases for TypedArray methods

This commit is contained in:
Napalys
2025-04-07 13:12:00 +02:00
parent e23ff9cf3e
commit d689a55229
2 changed files with 14 additions and 0 deletions

View File

@@ -43,6 +43,9 @@ consistencyIssue
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
| stringification-read-steps.js:17 | expected an alert, but found none | NOT OK | Consistency |
| stringification-read-steps.js:25 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:15 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:18 | expected an alert, but found none | NOT OK | Consistency |
| typed-arrays.js:22 | expected an alert, but found none | NOT OK | Consistency |
flow
| access-path-sanitizer.js:2:18:2:25 | source() | access-path-sanitizer.js:4:8:4:12 | obj.x |
| addexpr.js:4:10:4:17 | source() | addexpr.js:7:8:7:8 | x |

View File

@@ -9,4 +9,15 @@ function test() {
var arr = new Uint8Array(y.buffer, y.byteOffset, y.byteLength);
sink(arr); // NOT OK
const z = new Uint8Array([1, 2, 3]);
z.set(y, 3);
sink(z); // NOT OK
const sub = y.subarray(1, 3)
sink(sub); // NOT OK
const clone = new y.constructor(y.length);
clone.set(y);
sink(clone); // NOT OK
}