diff options
author | Rich Trott <rtrott@gmail.com> | 2017-09-03 14:06:09 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-09-15 15:34:39 -0700 |
commit | 3c4c0db26abba8211c0e6d42c14f14b3514b481b (patch) | |
tree | ff9ce5b5c1a9fe6374d958bdc8ce51260558c0b3 /benchmark/assert/deepequal-typedarrays.js | |
parent | 11f46a2586544e71c13e2de9c992ba3e48354a09 (diff) | |
download | android-node-v8-3c4c0db26abba8211c0e6d42c14f14b3514b481b.tar.gz android-node-v8-3c4c0db26abba8211c0e6d42c14f14b3514b481b.tar.bz2 android-node-v8-3c4c0db26abba8211c0e6d42c14f14b3514b481b.zip |
benchmark: provide default methods for assert
The benchmarks for `assert` all take a `method` configuration option,
but the allowable values are different across the files. For each
benchmark, provide an arbitrary default if `method` is set to an empty
string. This allows all the `assert` benchmarks to be run with a single
command but only on a single method. This is primarily useful for
testing that the assert benchmark files don't contain egregious errors.
(In other words, it's useful for testing.)
PR-URL: https://github.com/nodejs/node/pull/15174
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/assert/deepequal-typedarrays.js')
-rw-r--r-- | benchmark/assert/deepequal-typedarrays.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmark/assert/deepequal-typedarrays.js b/benchmark/assert/deepequal-typedarrays.js index 6794ced081..8e8cc4b083 100644 --- a/benchmark/assert/deepequal-typedarrays.js +++ b/benchmark/assert/deepequal-typedarrays.js @@ -38,6 +38,8 @@ function main(conf) { var i; switch (conf.method) { + case '': + // Empty string falls through to next line as default, mostly for tests. case 'deepEqual': bench.start(); for (i = 0; i < n; ++i) { |