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 <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Natalie Cluer authored and BridgeAR committed Nov 13, 2018
1 parent 82c64d0 commit 09a8f47
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 @@ -303,19 +303,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 09a8f47

Please sign in to comment.