|
| 1 | +'use strict'; |
| 2 | + |
| 3 | +require('../common'); |
| 4 | + |
| 5 | +// Minimal test for buffer benchmarks. This makes sure the benchmarks aren't |
| 6 | +// completely broken but nothing more than that. |
| 7 | + |
| 8 | +const assert = require('assert'); |
| 9 | +const fork = require('child_process').fork; |
| 10 | +const path = require('path'); |
| 11 | + |
| 12 | +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); |
| 13 | +const argv = ['--set', 'aligned=true', |
| 14 | + '--set', 'args=1', |
| 15 | + '--set', 'buffer=fast', |
| 16 | + '--set', 'encoding=utf8', |
| 17 | + '--set', 'len=2', |
| 18 | + '--set', 'method=', |
| 19 | + '--set', 'n=1', |
| 20 | + '--set', 'noAssert=true', |
| 21 | + '--set', 'pieces=1', |
| 22 | + '--set', 'pieceSize=1', |
| 23 | + '--set', 'search=@', |
| 24 | + '--set', 'size=1', |
| 25 | + '--set', 'source=array', |
| 26 | + '--set', 'type=', |
| 27 | + '--set', 'withTotalLength=0', |
| 28 | + 'buffers']; |
| 29 | + |
| 30 | +const child = fork(runjs, argv); |
| 31 | +child.on('exit', (code, signal) => { |
| 32 | + assert.strictEqual(code, 0); |
| 33 | + assert.strictEqual(signal, null); |
| 34 | +}); |
0 commit comments