From 82c63a55ea581d6d62d5d3b31ec49ce1db6aeccb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 9 Aug 2017 22:21:03 -0700 Subject: [PATCH] test: add test-benchmark-arrays Add minimal test to confirm that arrays benchmarks run. PR-URL: https://github.com/nodejs/node/pull/14728 Reviewed-By: Yuta Hiroto Reviewed-By: Daniel Bevenius Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock --- test/parallel/test-benchmark-arrays.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/parallel/test-benchmark-arrays.js diff --git a/test/parallel/test-benchmark-arrays.js b/test/parallel/test-benchmark-arrays.js new file mode 100644 index 00000000000000..2ffdc52c03a592 --- /dev/null +++ b/test/parallel/test-benchmark-arrays.js @@ -0,0 +1,21 @@ +'use strict'; + +require('../common'); + +// Minimal test for arrays benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'n=1', + '--set', 'type=Array', + 'arrays']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +});