Skip to content

Commit

Permalink
use existing executable_wrapper.h
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoroz committed Apr 23, 2024
1 parent 39a78d8 commit 51f2daa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 76 deletions.
1 change: 0 additions & 1 deletion Makefile
Expand Up @@ -1439,7 +1439,6 @@ FORMAT_CPP_FILES += $(LINT_CPP_FILES)
# C source codes.
FORMAT_CPP_FILES += $(wildcard \
benchmark/napi/*/*.c \
test/embedding/*.c \
test/js-native-api/*.h \
test/js-native-api/*/*.c \
test/js-native-api/*/*.h \
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Expand Up @@ -1152,6 +1152,7 @@

'include_dirs': [
'src',
'tools',
'tools/msvs/genfiles',
'deps/v8/include',
'deps/cares/include',
Expand All @@ -1163,7 +1164,6 @@
'sources': [
'src/node_snapshot_stub.cc',
'test/embedding/embedtest.cc',
'test/embedding/utf8_args.c',
],

'conditions': [
Expand Down
11 changes: 4 additions & 7 deletions test/embedding/embedtest.cc
Expand Up @@ -2,9 +2,8 @@
#undef NDEBUG
#endif
#include <assert.h>
#include "executable_wrapper.h"
#include "node.h"
#include "utf8_args.h"
#include "uv.h"

#include <algorithm>

Expand All @@ -28,10 +27,10 @@ static int RunNodeInstance(MultiIsolatePlatform* platform,
const std::vector<std::string>& args,
const std::vector<std::string>& exec_args);

int main(int argc, char** argv) {
GetUtf8CommandLineArgs(&argc, &argv);
NODE_MAIN(int argc, node::argv_type raw_argv[]) {
char** argv = nullptr;
node::FixupMain(argc, raw_argv, &argv);

argv = uv_setup_args(argc, argv);
std::vector<std::string> args(argv, argv + argc);
std::unique_ptr<node::InitializationResult> result =
node::InitializeOncePerProcess(
Expand All @@ -57,8 +56,6 @@ int main(int argc, char** argv) {
V8::DisposePlatform();

node::TearDownOncePerProcess();

FreeUtf8CommandLineArgs(argc, argv);
return ret;
}

Expand Down
47 changes: 0 additions & 47 deletions test/embedding/utf8_args.c

This file was deleted.

20 changes: 0 additions & 20 deletions test/embedding/utf8_args.h

This file was deleted.

0 comments on commit 51f2daa

Please sign in to comment.