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 481ea66

Browse filesBrowse files
nektroaduh95
authored andcommitted
test: add more number cases for buffer.indexOf
PR-URL: #57200 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 2c4f894 commit 481ea66
Copy full SHA for 481ea66

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-buffer-indexof.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-indexof.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ assert.strictEqual(b.indexOf('f', 5), 5);
7171
assert.strictEqual(b.indexOf('f', -1), 5);
7272
assert.strictEqual(b.indexOf('f', 6), -1);
7373

74+
assert.strictEqual(b.indexOf(100, 2), 3);
75+
assert.strictEqual(b.indexOf(102, 5), 5);
76+
assert.strictEqual(b.indexOf(102, -1), 5);
77+
assert.strictEqual(b.indexOf(102, 6), -1);
78+
7479
assert.strictEqual(b.indexOf(Buffer.from('d'), 2), 3);
7580
assert.strictEqual(b.indexOf(Buffer.from('f'), 5), 5);
7681
assert.strictEqual(b.indexOf(Buffer.from('f'), -1), 5);

0 commit comments

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