Skip to content

Commit

Permalink
test,assert: add deepEqual/deepStrictEqual tests for typed arrays
Browse files Browse the repository at this point in the history
Let's test typed arrays which have a .byteOffset and .byteLength (i.e.
typed arrays that are slices of parent typed arrays).

PR-URL: #8002
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
feross authored and cjihrig committed Aug 10, 2016
1 parent 57043aa commit 0daceff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-assert-typedarray-deepequal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ const equalArrayPairs = [
[new Int16Array([256]), new Uint16Array([256])],
[new Float32Array([+0.0]), new Float32Array([-0.0])],
[new Float64Array([+0.0]), new Float32Array([-0.0])],
[new Float64Array([+0.0]), new Float64Array([-0.0])]
[new Float64Array([+0.0]), new Float64Array([-0.0])],
[new Uint8Array([1, 2, 3, 4]).subarray(1), new Uint8Array([2, 3, 4])],
[new Uint16Array([1, 2, 3, 4]).subarray(1), new Uint16Array([2, 3, 4])],
[new Uint32Array([1, 2, 3, 4]).subarray(1, 3), new Uint32Array([2, 3])]
];

const notEqualArrayPairs = [
Expand Down

0 comments on commit 0daceff

Please sign in to comment.