Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0daceff

Browse filesBrowse files
ferosscjihrig
authored andcommitted
test,assert: add deepEqual/deepStrictEqual tests for typed arrays
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 <anna@addaleax.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 57043aa commit 0daceff
Copy full SHA for 0daceff

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-assert-typedarray-deepequal.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert-typedarray-deepequal.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ const equalArrayPairs = [
2626
[new Int16Array([256]), new Uint16Array([256])],
2727
[new Float32Array([+0.0]), new Float32Array([-0.0])],
2828
[new Float64Array([+0.0]), new Float32Array([-0.0])],
29-
[new Float64Array([+0.0]), new Float64Array([-0.0])]
29+
[new Float64Array([+0.0]), new Float64Array([-0.0])],
30+
[new Uint8Array([1, 2, 3, 4]).subarray(1), new Uint8Array([2, 3, 4])],
31+
[new Uint16Array([1, 2, 3, 4]).subarray(1), new Uint16Array([2, 3, 4])],
32+
[new Uint32Array([1, 2, 3, 4]).subarray(1, 3), new Uint32Array([2, 3])]
3033
];
3134

3235
const notEqualArrayPairs = [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.