From 19f507a9012a5dca482bea42bb06361ba9c865ca Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Tue, 30 Apr 2019 00:25:54 +0800 Subject: [PATCH 1/2] report: use const reference in node_report.cc --- src/node_report.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_report.cc b/src/node_report.cc index 8a257b0c9c6ef4..d917a772812b27 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -231,7 +231,7 @@ static void WriteNodeReport(Isolate* isolate, // Report out the command line. if (!node::per_process::cli_options->cmdline.empty()) { writer.json_arraystart("commandLine"); - for (std::string arg : node::per_process::cli_options->cmdline) { + for (const std::string& arg : node::per_process::cli_options->cmdline) { writer.json_element(arg); } writer.json_arrayend(); From 7e343b2903ecb0715bd918110c065857eb6db085 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Tue, 30 Apr 2019 00:27:20 +0800 Subject: [PATCH 2/2] test: better output for test-report-uv-handles.js --- test/report/test-report-uv-handles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index 51677168947bf4..20619204325f41 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -85,7 +85,7 @@ if (process.argv[2] === 'child') { const report_msg = 'Report files were written: unexpectedly'; child.stdout.on('data', (chunk) => { stdout += chunk; }); child.on('exit', common.mustCall((code, signal) => { - assert.deepStrictEqual(code, 0, 'Process exited unexpectedly with code' + + assert.deepStrictEqual(code, 0, 'Process exited unexpectedly with code: ' + `${code}`); assert.deepStrictEqual(signal, null, 'Process should have exited cleanly,' + ` but did not: ${signal}`);