From 357230f4b7174380467edfb0a65a00b65b0af66c Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 20 Jan 2020 09:21:56 +0100 Subject: [PATCH] benchmark: remove special test entries It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: https://github.com/nodejs/node/pull/31396 Reviewed-By: Sam Roberts Reviewed-By: Rich Trott --- benchmark/assert/deepequal-buffer.js | 4 +--- benchmark/assert/deepequal-map.js | 2 -- benchmark/assert/deepequal-object.js | 5 +---- benchmark/assert/deepequal-prims-and-objs-big-array-set.js | 2 -- benchmark/assert/deepequal-prims-and-objs-big-loop.js | 4 +--- benchmark/assert/deepequal-set.js | 2 -- benchmark/assert/deepequal-typedarrays.js | 2 -- benchmark/assert/throws.js | 2 -- benchmark/buffers/buffer-bytelength.js | 4 ++-- benchmark/buffers/buffer-creation.js | 1 - benchmark/buffers/buffer-fill.js | 2 +- benchmark/buffers/buffer-iterate.js | 2 +- benchmark/buffers/buffer-read-float.js | 1 - benchmark/buffers/buffer-read-with-byteLength.js | 2 +- benchmark/buffers/buffer-read.js | 2 +- benchmark/buffers/buffer-swap.js | 2 +- benchmark/buffers/buffer-write.js | 2 +- benchmark/buffers/dataview-set.js | 1 - benchmark/crypto/aes-gcm-throughput.js | 3 --- benchmark/crypto/cipher-stream.js | 6 +----- benchmark/es/defaultparams-bench.js | 2 -- benchmark/es/destructuring-bench.js | 2 -- benchmark/es/destructuring-object-bench.js | 2 -- benchmark/es/foreach-bench.js | 2 -- benchmark/es/map-bench.js | 2 -- benchmark/es/restparams-bench.js | 2 -- benchmark/es/spread-assign.js | 2 -- benchmark/es/spread-bench.js | 2 -- benchmark/es/string-concatenations.js | 2 -- benchmark/es/string-repeat.js | 2 -- benchmark/misc/arguments.js | 2 -- benchmark/misc/getstringwidth.js | 2 -- benchmark/misc/object-property-bench.js | 2 -- benchmark/misc/punycode.js | 2 -- benchmark/misc/trace.js | 1 - benchmark/misc/util-extend-vs-object-assign.js | 4 ---- benchmark/url/url-format.js | 2 +- benchmark/url/url-parse.js | 2 +- benchmark/util/format.js | 3 +-- benchmark/util/inspect-array.js | 2 -- benchmark/util/type-check.js | 3 --- 41 files changed, 15 insertions(+), 81 deletions(-) diff --git a/benchmark/assert/deepequal-buffer.js b/benchmark/assert/deepequal-buffer.js index 6d9162f15173f9..69cca91cc6d752 100644 --- a/benchmark/assert/deepequal-buffer.js +++ b/benchmark/assert/deepequal-buffer.js @@ -6,12 +6,10 @@ const bench = common.createBenchmark(main, { n: [2e4], len: [1e2, 1e3], strict: [0, 1], - method: [ 'deepEqual', 'notDeepEqual' ], + method: ['deepEqual', 'notDeepEqual'], }); function main({ len, n, method, strict }) { - if (!method) - method = 'deepEqual'; const data = Buffer.allocUnsafe(len + 1); const actual = Buffer.alloc(len); const expected = Buffer.alloc(len); diff --git a/benchmark/assert/deepequal-map.js b/benchmark/assert/deepequal-map.js index b88ecf7ce127f9..77408e3d103475 100644 --- a/benchmark/assert/deepequal-map.js +++ b/benchmark/assert/deepequal-map.js @@ -34,8 +34,6 @@ function main({ n, len, method, strict }) { const array = Array(len).fill(1); switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'deepEqual_primitiveOnly': { const values = array.map((_, i) => [`str_${i}`, 123]); benchmark(strict ? deepStrictEqual : deepEqual, n, values); diff --git a/benchmark/assert/deepequal-object.js b/benchmark/assert/deepequal-object.js index e23f6692b3decd..a8c539426a8156 100644 --- a/benchmark/assert/deepequal-object.js +++ b/benchmark/assert/deepequal-object.js @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { n: [5e3], size: [1e2, 1e3, 5e4], strict: [0, 1], - method: [ 'deepEqual', 'notDeepEqual' ], + method: ['deepEqual', 'notDeepEqual'], }); function createObj(source, add = '') { @@ -27,9 +27,6 @@ function main({ size, n, method, strict }) { // TODO: Fix this "hack". `n` should not be manipulated. n = Math.min(Math.ceil(n / size), 20); - if (!method) - method = 'deepEqual'; - const source = Array.apply(null, Array(size)); const actual = createObj(source); const expected = createObj(source); diff --git a/benchmark/assert/deepequal-prims-and-objs-big-array-set.js b/benchmark/assert/deepequal-prims-and-objs-big-array-set.js index 0e0ce450bb1a98..ad049ded02ce9d 100644 --- a/benchmark/assert/deepequal-prims-and-objs-big-array-set.js +++ b/benchmark/assert/deepequal-prims-and-objs-big-array-set.js @@ -52,8 +52,6 @@ function main({ n, len, primitive, method, strict }) { const expectedWrongSet = new Set(expectedWrong); switch (method) { - // Empty string falls through to next line as default, mostly for tests. - case '': case 'deepEqual_Array': run(strict ? deepStrictEqual : deepEqual, n, actual, expected); break; diff --git a/benchmark/assert/deepequal-prims-and-objs-big-loop.js b/benchmark/assert/deepequal-prims-and-objs-big-loop.js index 32140f08ded6fb..2d01431b1fc563 100644 --- a/benchmark/assert/deepequal-prims-and-objs-big-loop.js +++ b/benchmark/assert/deepequal-prims-and-objs-big-loop.js @@ -13,12 +13,10 @@ const bench = common.createBenchmark(main, { primitive: Object.keys(primValues), n: [2e4], strict: [0, 1], - method: [ 'deepEqual', 'notDeepEqual' ], + method: ['deepEqual', 'notDeepEqual'], }); function main({ n, primitive, method, strict }) { - if (!method) - method = 'deepEqual'; const prim = primValues[primitive]; const actual = prim; const expected = prim; diff --git a/benchmark/assert/deepequal-set.js b/benchmark/assert/deepequal-set.js index 561a951e6834cc..27ca7c92bce1b0 100644 --- a/benchmark/assert/deepequal-set.js +++ b/benchmark/assert/deepequal-set.js @@ -34,8 +34,6 @@ function main({ n, len, method, strict }) { const array = Array(len).fill(1); switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'deepEqual_primitiveOnly': { const values = array.map((_, i) => `str_${i}`); benchmark(strict ? deepStrictEqual : deepEqual, n, values); diff --git a/benchmark/assert/deepequal-typedarrays.js b/benchmark/assert/deepequal-typedarrays.js index 10ba21a25759e2..188cfce695ed61 100644 --- a/benchmark/assert/deepequal-typedarrays.js +++ b/benchmark/assert/deepequal-typedarrays.js @@ -20,8 +20,6 @@ const bench = common.createBenchmark(main, { }); function main({ type, n, len, method, strict }) { - if (!method) - method = 'deepEqual'; const clazz = global[type]; const actual = new clazz(len); const expected = new clazz(len); diff --git a/benchmark/assert/throws.js b/benchmark/assert/throws.js index c80518377a8742..978ad2f1b8bef0 100644 --- a/benchmark/assert/throws.js +++ b/benchmark/assert/throws.js @@ -15,8 +15,6 @@ function main({ n, method }) { const message = 'failure'; switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'doesNotThrow': bench.start(); for (let i = 0; i < n; ++i) { diff --git a/benchmark/buffers/buffer-bytelength.js b/benchmark/buffers/buffer-bytelength.js index 1b324a49f89de8..fbbe0f040da56a 100644 --- a/benchmark/buffers/buffer-bytelength.js +++ b/benchmark/buffers/buffer-bytelength.js @@ -17,9 +17,9 @@ const chars = [ function main({ n, len, encoding }) { let strings = []; - let results = [ len * 16 ]; + let results = [len * 16]; if (encoding === 'buffer') { - strings = [ Buffer.alloc(len * 16, 'a') ]; + strings = [Buffer.alloc(len * 16, 'a')]; } else { for (const string of chars) { // Strings must be built differently, depending on encoding diff --git a/benchmark/buffers/buffer-creation.js b/benchmark/buffers/buffer-creation.js index 38d80da915c070..862bff4fbabe58 100644 --- a/benchmark/buffers/buffer-creation.js +++ b/benchmark/buffers/buffer-creation.js @@ -16,7 +16,6 @@ const bench = common.createBenchmark(main, { function main({ len, n, type }) { let fn, i; switch (type) { - case '': case 'fast-alloc': fn = Buffer.alloc; break; diff --git a/benchmark/buffers/buffer-fill.js b/benchmark/buffers/buffer-fill.js index 02bc2a206c6fe3..8d4d4996068224 100644 --- a/benchmark/buffers/buffer-fill.js +++ b/benchmark/buffers/buffer-fill.js @@ -22,7 +22,7 @@ function main({ n, type, size }) { const buffer = Buffer.allocUnsafe(size); const testFunction = new Function('b', ` for (var i = 0; i < ${n}; i++) { - b.${type || 'fill(0)'}; + b.${type}; } `); bench.start(); diff --git a/benchmark/buffers/buffer-iterate.js b/benchmark/buffers/buffer-iterate.js index de002108a95d65..3e2a897903d435 100644 --- a/benchmark/buffers/buffer-iterate.js +++ b/benchmark/buffers/buffer-iterate.js @@ -21,7 +21,7 @@ function main({ size, type, method, n }) { Buffer.alloc(size) : SlowBuffer(size).fill(0); - const fn = methods[method || 'for']; + const fn = methods[method]; bench.start(); fn(buffer, n); diff --git a/benchmark/buffers/buffer-read-float.js b/benchmark/buffers/buffer-read-float.js index e8c4f8bf549628..656762d1d4f1d0 100644 --- a/benchmark/buffers/buffer-read-float.js +++ b/benchmark/buffers/buffer-read-float.js @@ -9,7 +9,6 @@ const bench = common.createBenchmark(main, { }); function main({ n, type, endian, value }) { - type = type || 'Double'; const buff = Buffer.alloc(8); const fn = `read${type}${endian}`; const values = { diff --git a/benchmark/buffers/buffer-read-with-byteLength.js b/benchmark/buffers/buffer-read-with-byteLength.js index 6ba1594b8ac6eb..c51ab11ae986d7 100644 --- a/benchmark/buffers/buffer-read-with-byteLength.js +++ b/benchmark/buffers/buffer-read-with-byteLength.js @@ -19,7 +19,7 @@ function main({ n, buf, type, byteLength }) { const buff = buf === 'fast' ? Buffer.alloc(8) : require('buffer').SlowBuffer(8); - const fn = `read${type || 'IntBE'}`; + const fn = `read${type}`; buff.writeDoubleLE(0, 0); bench.start(); diff --git a/benchmark/buffers/buffer-read.js b/benchmark/buffers/buffer-read.js index 2ddca60df44c29..e0ec13992c2fae 100644 --- a/benchmark/buffers/buffer-read.js +++ b/benchmark/buffers/buffer-read.js @@ -28,7 +28,7 @@ function main({ n, buf, type }) { const buff = buf === 'fast' ? Buffer.alloc(8) : require('buffer').SlowBuffer(8); - const fn = `read${type || 'UInt8'}`; + const fn = `read${type}`; buff.writeDoubleLE(0, 0); bench.start(); diff --git a/benchmark/buffers/buffer-swap.js b/benchmark/buffers/buffer-swap.js index 5c31d86f7e2ab4..e43957efbdb095 100644 --- a/benchmark/buffers/buffer-swap.js +++ b/benchmark/buffers/buffer-swap.js @@ -76,7 +76,7 @@ function genMethod(method) { function main({ method, len, n, aligned = 'true' }) { const buf = createBuffer(len, aligned === 'true'); - const bufferSwap = genMethod(method || 'swap16'); + const bufferSwap = genMethod(method); bufferSwap(n, buf); bench.start(); diff --git a/benchmark/buffers/buffer-write.js b/benchmark/buffers/buffer-write.js index db5a57d0023e72..5025dd2bca0407 100644 --- a/benchmark/buffers/buffer-write.js +++ b/benchmark/buffers/buffer-write.js @@ -74,7 +74,7 @@ function main({ n, buf, type }) { const buff = buf === 'fast' ? Buffer.alloc(8) : require('buffer').SlowBuffer(8); - const fn = `write${type || 'UInt8'}`; + const fn = `write${type}`; if (!/\d/.test(fn)) benchSpecialInt(buff, fn, n); diff --git a/benchmark/buffers/dataview-set.js b/benchmark/buffers/dataview-set.js index a741d11356ea32..b7914fe45f175b 100644 --- a/benchmark/buffers/dataview-set.js +++ b/benchmark/buffers/dataview-set.js @@ -40,7 +40,6 @@ const mod = { }; function main({ n, type }) { - type = type || 'Uint8'; const ab = new ArrayBuffer(8); const dv = new DataView(ab, 0, 8); const le = /LE$/.test(type); diff --git a/benchmark/crypto/aes-gcm-throughput.js b/benchmark/crypto/aes-gcm-throughput.js index b1b08c481700ea..3f2b9ba45eb3f2 100644 --- a/benchmark/crypto/aes-gcm-throughput.js +++ b/benchmark/crypto/aes-gcm-throughput.js @@ -9,9 +9,6 @@ const bench = common.createBenchmark(main, { }); function main({ n, len, cipher }) { - // Default cipher for tests. - if (cipher === '') - cipher = 'aes-128-gcm'; const message = Buffer.alloc(len, 'b'); const key = crypto.randomBytes(keylen[cipher]); const iv = crypto.randomBytes(12); diff --git a/benchmark/crypto/cipher-stream.js b/benchmark/crypto/cipher-stream.js index 9f4a1bb4fa3d40..47a8931a540447 100644 --- a/benchmark/crypto/cipher-stream.js +++ b/benchmark/crypto/cipher-stream.js @@ -3,7 +3,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { writes: [500], - cipher: [ 'AES192', 'AES256' ], + cipher: ['AES192', 'AES256'], type: ['asc', 'utf', 'buf'], len: [2, 1024, 102400, 1024 * 1024], api: ['legacy', 'stream'] @@ -12,9 +12,6 @@ const bench = common.createBenchmark(main, { }); function main({ api, cipher, type, len, writes }) { - // Default cipher for tests. - if (cipher === '') - cipher = 'AES192'; if (api === 'stream' && /^v0\.[0-8]\./.test(process.version)) { console.error('Crypto streams not available until v0.10'); // Use the legacy, just so that we can compare them. @@ -29,7 +26,6 @@ function main({ api, cipher, type, len, writes }) { alice.generateKeys(); bob.generateKeys(); - const pubEnc = /^v0\.[0-8]/.test(process.version) ? 'binary' : null; const alice_secret = alice.computeSecret(bob.getPublicKey(), pubEnc, 'hex'); const bob_secret = bob.computeSecret(alice.getPublicKey(), pubEnc, 'hex'); diff --git a/benchmark/es/defaultparams-bench.js b/benchmark/es/defaultparams-bench.js index ab9cc45749c996..fde4cb11ad448a 100644 --- a/benchmark/es/defaultparams-bench.js +++ b/benchmark/es/defaultparams-bench.js @@ -36,8 +36,6 @@ function runDefaultParams(n) { function main({ n, method }) { switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'withoutdefaults': runOldStyleDefaults(n); break; diff --git a/benchmark/es/destructuring-bench.js b/benchmark/es/destructuring-bench.js index f1b484bd47e08f..c07c0383da91ac 100644 --- a/benchmark/es/destructuring-bench.js +++ b/benchmark/es/destructuring-bench.js @@ -36,8 +36,6 @@ function runSwapDestructured(n) { function main({ n, method }) { switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'swap': runSwapManual(n); break; diff --git a/benchmark/es/destructuring-object-bench.js b/benchmark/es/destructuring-object-bench.js index 68dc17073badc2..29c83bd188e89d 100644 --- a/benchmark/es/destructuring-object-bench.js +++ b/benchmark/es/destructuring-object-bench.js @@ -33,8 +33,6 @@ function runDestructured(n) { function main({ n, method }) { switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'normal': runNormal(n); break; diff --git a/benchmark/es/foreach-bench.js b/benchmark/es/foreach-bench.js index 88bfed00fbc27c..6992a1a5749438 100644 --- a/benchmark/es/foreach-bench.js +++ b/benchmark/es/foreach-bench.js @@ -54,8 +54,6 @@ function main({ n, count, method }) { items[i] = i; switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'for': fn = useFor; break; diff --git a/benchmark/es/map-bench.js b/benchmark/es/map-bench.js index 1b3ba4789db073..d0b8534cf7c906 100644 --- a/benchmark/es/map-bench.js +++ b/benchmark/es/map-bench.js @@ -104,8 +104,6 @@ function runMap(n) { function main({ n, method }) { switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'object': runObject(n); break; diff --git a/benchmark/es/restparams-bench.js b/benchmark/es/restparams-bench.js index d568e28744541f..8129bc92533332 100644 --- a/benchmark/es/restparams-bench.js +++ b/benchmark/es/restparams-bench.js @@ -51,8 +51,6 @@ function runUseArguments(n) { function main({ n, method }) { let fn; switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'copy': fn = runCopyArguments; break; diff --git a/benchmark/es/spread-assign.js b/benchmark/es/spread-assign.js index 97a5c5458e396b..970512aa6b93d4 100644 --- a/benchmark/es/spread-assign.js +++ b/benchmark/es/spread-assign.js @@ -18,8 +18,6 @@ function main({ n, context, count, rest, method }) { let obj; // eslint-disable-line no-unused-vars switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case '_extend': bench.start(); for (let i = 0; i < n; i++) diff --git a/benchmark/es/spread-bench.js b/benchmark/es/spread-bench.js index fc56c9433f2add..ae5b4abbb99c02 100644 --- a/benchmark/es/spread-bench.js +++ b/benchmark/es/spread-bench.js @@ -32,8 +32,6 @@ function main({ n, context, count, rest, method }) { args[i] = i; switch (method) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'apply': bench.start(); for (let i = 0; i < n; i++) diff --git a/benchmark/es/string-concatenations.js b/benchmark/es/string-concatenations.js index 72fb7f9969b604..3c0b27e05019d1 100644 --- a/benchmark/es/string-concatenations.js +++ b/benchmark/es/string-concatenations.js @@ -23,8 +23,6 @@ function main({ n, mode }) { let string; switch (mode) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'multi-concat': bench.start(); for (let i = 0; i < n; i++) diff --git a/benchmark/es/string-repeat.js b/benchmark/es/string-repeat.js index 9e33e4acf47118..f4bd616e4ada4b 100644 --- a/benchmark/es/string-repeat.js +++ b/benchmark/es/string-repeat.js @@ -18,8 +18,6 @@ function main({ n, size, encoding, mode }) { let str; switch (mode) { - case '': - // Empty string falls through to next line as default, mostly for tests. case 'Array': bench.start(); for (let i = 0; i < n; i++) diff --git a/benchmark/misc/arguments.js b/benchmark/misc/arguments.js index 8fefe617a51d56..39f4020b1ad20e 100644 --- a/benchmark/misc/arguments.js +++ b/benchmark/misc/arguments.js @@ -34,8 +34,6 @@ function usingPredefined() { function main({ n, method, args }) { let fn; switch (method) { - // '' is a default case for tests - case '': case 'restAndSpread': fn = usingRestAndSpread; break; diff --git a/benchmark/misc/getstringwidth.js b/benchmark/misc/getstringwidth.js index c10f7af8483cf9..9dd4b47df7182e 100644 --- a/benchmark/misc/getstringwidth.js +++ b/benchmark/misc/getstringwidth.js @@ -10,8 +10,6 @@ const bench = common.createBenchmark(main, { }); function main({ n, type }) { - // Default value for testing purposes. - type = type || 'ascii'; const { getStringWidth } = require('internal/util/inspect'); const str = ({ diff --git a/benchmark/misc/object-property-bench.js b/benchmark/misc/object-property-bench.js index 0a4d004999ed23..9b33ac9a636889 100644 --- a/benchmark/misc/object-property-bench.js +++ b/benchmark/misc/object-property-bench.js @@ -64,8 +64,6 @@ function runSymbol(n) { function main({ n, method }) { switch (method) { - // '' is a default case for tests - case '': case 'property': runProperty(n); break; diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js index 5f85df758ef7e3..9c674b5deefb8c 100644 --- a/benchmark/misc/punycode.js +++ b/benchmark/misc/punycode.js @@ -62,8 +62,6 @@ function runICU(n, val) { function main({ n, val, method }) { switch (method) { - // '' is a default case for tests - case '': case 'punycode': runPunycode(n, val); break; diff --git a/benchmark/misc/trace.js b/benchmark/misc/trace.js index f06e8597cc30e9..8620e99329b224 100644 --- a/benchmark/misc/trace.js +++ b/benchmark/misc/trace.js @@ -41,7 +41,6 @@ function main({ n, method }) { } = common.binding('trace_events'); switch (method) { - case '': case 'trace': doTrace(n, trace); break; diff --git a/benchmark/misc/util-extend-vs-object-assign.js b/benchmark/misc/util-extend-vs-object-assign.js index b3d95f0e2d97a4..83aec7b9c82231 100644 --- a/benchmark/misc/util-extend-vs-object-assign.js +++ b/benchmark/misc/util-extend-vs-object-assign.js @@ -9,10 +9,6 @@ const bench = common.createBenchmark(main, { }); function main({ n, type }) { - // Default value for tests. - if (type === '') - type = 'extend'; - let fn; if (type === 'extend') { fn = util._extend; diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js index 3e91cefd363c37..be5632d2b67367 100644 --- a/benchmark/url/url-format.js +++ b/benchmark/url/url-format.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { }); function main({ type, n }) { - const input = inputs[type] || ''; + const input = inputs[type]; // Force-optimize url.format() so that the benchmark doesn't get // disrupted by the optimizer kicking in halfway through. diff --git a/benchmark/url/url-parse.js b/benchmark/url/url-parse.js index 751a11201b11e2..b3e83188b2192f 100644 --- a/benchmark/url/url-parse.js +++ b/benchmark/url/url-parse.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { }); function main({ type, n }) { - const input = inputs[type] || ''; + const input = inputs[type]; bench.start(); for (let i = 0; i < n; i += 1) diff --git a/benchmark/util/format.js b/benchmark/util/format.js index 976e0f4e655486..f7a6caa81c96b6 100644 --- a/benchmark/util/format.js +++ b/benchmark/util/format.js @@ -23,8 +23,7 @@ const bench = common.createBenchmark(main, { }); function main({ n, type }) { - // For testing, if supplied with an empty type, default to string. - const [first, second] = inputs[type || 'string']; + const [first, second] = inputs[type]; bench.start(); for (let i = 0; i < n; i++) { diff --git a/benchmark/util/inspect-array.js b/benchmark/util/inspect-array.js index 4fd73785f789d1..987b40479184d2 100644 --- a/benchmark/util/inspect-array.js +++ b/benchmark/util/inspect-array.js @@ -23,8 +23,6 @@ function main({ n, len, type }) { opts = { showHidden: true }; arr = arr.fill('denseArray'); break; - // For testing, if supplied with an empty type, default to denseArray. - case '': case 'denseArray': arr = arr.fill('denseArray'); break; diff --git a/benchmark/util/type-check.js b/benchmark/util/type-check.js index 8d57bc000afcd1..792f61cf6fb217 100644 --- a/benchmark/util/type-check.js +++ b/benchmark/util/type-check.js @@ -35,9 +35,6 @@ const bench = common.createBenchmark(main, { }); function main({ type, argument, version, n }) { - // For testing, if supplied with an empty type, default to ArrayBufferView. - type = type || 'ArrayBufferView'; - const util = common.binding('util'); const types = require('internal/util/types');