summaryrefslogtreecommitdiff
path: root/benchmark/es
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-11-24 11:43:35 -0800
committerRich Trott <rtrott@gmail.com>2016-11-27 21:51:09 -0800
commit566a1513d1a21674a35153f28db051c372047f24 (patch)
treedab80b0647fe5dbc676defac3b4ca82fd366caee /benchmark/es
parent31d1a3f8a89e709ccd7aa07d900464c234d9727f (diff)
downloadandroid-node-v8-566a1513d1a21674a35153f28db051c372047f24.tar.gz
android-node-v8-566a1513d1a21674a35153f28db051c372047f24.tar.bz2
android-node-v8-566a1513d1a21674a35153f28db051c372047f24.zip
benchmark: reformat code for clarity
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 <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'benchmark/es')
-rw-r--r--benchmark/es/map-bench.js8
1 files changed, 4 insertions, 4 deletions
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);
}