Skip to content

Commit 481ea66

Browse files
nektroaduh95
authored andcommitted
test: add more number cases for buffer.indexOf
PR-URL: #57200 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 2c4f894 commit 481ea66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-buffer-indexof.js

+5
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)