Skip to content

Commit

Permalink
test: correct order of args in assert.strictEqual()
Browse files Browse the repository at this point in the history
Ensure literal values are passed in as second argument

PR-URL: #24157
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Natalie Cluer authored and MylesBorins committed Dec 26, 2018
1 parent 0260db5 commit 704d886
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-buffer-fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,19 @@ Buffer.alloc(8, '');

buf.fill(0);
for (let i = 0; i < buf.length; i++)
assert.strictEqual(0, buf[i]);
assert.strictEqual(buf[i], 0);

buf.fill(null);
for (let i = 0; i < buf.length; i++)
assert.strictEqual(0, buf[i]);
assert.strictEqual(buf[i], 0);

buf.fill(1, 16, 32);
for (let i = 0; i < 16; i++)
assert.strictEqual(0, buf[i]);
assert.strictEqual(buf[i], 0);
for (let i = 16; i < 32; i++)
assert.strictEqual(1, buf[i]);
assert.strictEqual(buf[i], 1);
for (let i = 32; i < buf.length; i++)
assert.strictEqual(0, buf[i]);
assert.strictEqual(buf[i], 0);
}

{
Expand Down

0 comments on commit 704d886

Please sign in to comment.