mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
test: use InitializeNodeWithArgs in cctest
Refs: d7f11077f1
Fixes: https://github.com/nodejs/node/issues/30257
PR-URL: https://github.com/nodejs/node/pull/32406
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
6b5f82d7f8
commit
f2cc28aec3
@ -72,11 +72,13 @@ class NodeZeroIsolateTestFixture : public ::testing::Test {
|
||||
if (!node_initialized) {
|
||||
uv_os_unsetenv("NODE_OPTIONS");
|
||||
node_initialized = true;
|
||||
int argc = 1;
|
||||
const char* argv0 = "cctest";
|
||||
int exec_argc;
|
||||
const char** exec_argv;
|
||||
node::Init(&argc, &argv0, &exec_argc, &exec_argv);
|
||||
std::vector<std::string> argv { "cctest" };
|
||||
std::vector<std::string> exec_argv;
|
||||
std::vector<std::string> errors;
|
||||
|
||||
int exitcode = node::InitializeNodeWithArgs(&argv, &exec_argv, &errors);
|
||||
CHECK_EQ(exitcode, 0);
|
||||
CHECK(errors.empty());
|
||||
}
|
||||
|
||||
tracing_agent = std::make_unique<node::tracing::Agent>();
|
||||
|
Loading…
Reference in New Issue
Block a user