From 566a1513d1a21674a35153f28db051c372047f24 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 24 Nov 2016 11:43:35 -0800 Subject: benchmark: reformat code for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the benchmark code can be a little dense. Not *very* hard to read but perhaps harder than it needs to be. These changes (many of them whitespace-only) hopefully improve readability. There are also a few cases of `assert.equal()` that are changed to `assert.strictEqual()`. PR-URL: https://github.com/nodejs/node/pull/9790 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig --- benchmark/es/map-bench.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'benchmark/es') diff --git a/benchmark/es/map-bench.js b/benchmark/es/map-bench.js index 574da25d53..047fc05abd 100644 --- a/benchmark/es/map-bench.js +++ b/benchmark/es/map-bench.js @@ -15,7 +15,7 @@ function runObject(n) { for (; i < n; i++) { m['i' + i] = i; m['s' + i] = String(i); - assert.equal(m['i' + i], m['s' + i]); + assert.strictEqual(String(m['i' + i]), m['s' + i]); m['i' + i] = undefined; m['s' + i] = undefined; } @@ -29,7 +29,7 @@ function runNullProtoObject(n) { for (; i < n; i++) { m['i' + i] = i; m['s' + i] = String(i); - assert.equal(m['i' + i], m['s' + i]); + assert.strictEqual(String(m['i' + i]), m['s' + i]); m['i' + i] = undefined; m['s' + i] = undefined; } @@ -53,7 +53,7 @@ function runFakeMap(n) { for (; i < n; i++) { m.set('i' + i, i); m.set('s' + i, String(i)); - assert.equal(m.get('i' + i), m.get('s' + i)); + assert.strictEqual(String(m.get('i' + i)), m.get('s' + i)); m.set('i' + i, undefined); m.set('s' + i, undefined); } @@ -67,7 +67,7 @@ function runMap(n) { for (; i < n; i++) { m.set('i' + i, i); m.set('s' + i, String(i)); - assert.equal(m.get('i' + i), m.get('s' + i)); + assert.strictEqual(String(m.get('i' + i)), m.get('s' + i)); m.set('i' + i, undefined); m.set('s' + i, undefined); } -- cgit v1.2.3