Skip to content

Commit f7651d2

Browse files
Trottevanlucas
authored andcommitted
test: improve error message in test-tick-processor
Provide additional information about values that indicate test failed. PR-URL: #7693 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent acb976a commit f7651d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-tick-processor.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
2-
var fs = require('fs');
3-
var assert = require('assert');
4-
var cp = require('child_process');
5-
var common = require('../common');
2+
const fs = require('fs');
3+
const assert = require('assert');
4+
const cp = require('child_process');
5+
const common = require('../common');
66

77
// TODO(mhdawson) Currently the test-tick-processor functionality in V8
88
// depends on addresses being smaller than a full 64 bits. Aix supports
@@ -49,12 +49,12 @@ function runTest(pattern, code) {
4949
return /^isolate-/.test(file);
5050
});
5151
if (matches.length != 1) {
52-
assert.fail(null, null, 'There should be a single log file.');
52+
common.fail('There should be a single log file.');
5353
}
5454
var log = matches[0];
5555
var out = cp.execSync(process.execPath +
5656
' --prof-process --call-graph-size=10 ' + log,
5757
{encoding: 'utf8'});
58-
assert(pattern.test(out));
58+
assert(pattern.test(out), `${pattern} not matching ${out}`);
5959
fs.unlinkSync(log);
6060
}

0 commit comments

Comments
 (0)