test: fix variable redeclarations

I'm a fan of small changesets, but even I'm getting a little annoyed at
me for opening all these PRs weeding out variable redeclarations. So I'm
bundling a bunch of small changes here.

PR-URL: https://github.com/nodejs/node/pull/4992
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott authored and Myles Borins committed 2016-03-02 14:01:11 -08:00
1 parent 6c2d902c3d
commit 3733c032fc
9 files changed
+31 -32

No files matched your search

+3 -3
View File
@@ -22,9 +22,9 @@ write_str = Array(size).join(write_str);
ucs2_control = Array(size).join(ucs2_control);
// check resultant buffer and output string
var b = new Buffer(write_str, 'ucs2');
b = new Buffer(write_str, 'ucs2');
// check fist Buffer created from write string
for (var i = 0; i < b.length; i += 2) {
for (let i = 0; i < b.length; i += 2) {
assert.equal(b[i], 0x61);
assert.equal(b[i + 1], 0);
}
@@ -39,7 +39,7 @@ var c_ucs = new Buffer(b_ucs, 'ucs2');
// make sure they're the same length
assert.equal(c_bin.length, c_ucs.length);
// make sure Buffers from externals are the same
for (var i = 0; i < c_bin.length; i++) {
for (let i = 0; i < c_bin.length; i++) {
assert.equal(c_bin[i], c_ucs[i]);
}
// check resultant strings