GeezerVison is showing github.com — test: remove NodeTestFixture from Env constructor · nodejs/node@4e9279d
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/cctest/node_test_fixture.h +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -100,9 +100,7 @@ class EnvironmentTestFixture : public NodeTestFixture { | 100 | 100 | public: | 101 | 101 | class Env { | 102 | 102 | public: | 103 | | - Env(const v8::HandleScope& handle_scope, | 104 | | - const Argv& argv, | 105 | | - NodeTestFixture* test_fixture) { | | 103 | + Env(const v8::HandleScope& handle_scope, const Argv& argv) { | 106 | 104 | auto isolate = handle_scope.GetIsolate(); | 107 | 105 | context_ = node::NewContext(isolate); | 108 | 106 | CHECK(!context_.IsEmpty()); | |
Collapse file Copy file name to clipboardExpand all lines: test/cctest/test_environment.cc +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ class EnvironmentTest : public EnvironmentTestFixture { | 32 | 32 | TEST_F(EnvironmentTest, AtExitWithEnvironment) { | 33 | 33 | const v8::HandleScope handle_scope(isolate_); | 34 | 34 | const Argv argv; | 35 | | - Env env {handle_scope, argv, this}; | | 35 | + Env env {handle_scope, argv}; | 36 | 36 |
| 37 | 37 | AtExit(*env, at_exit_callback1); | 38 | 38 | RunAtExit(*env); | @@ -42,7 +42,7 @@ TEST_F(EnvironmentTest, AtExitWithEnvironment) { | 42 | 42 | TEST_F(EnvironmentTest, AtExitWithArgument) { | 43 | 43 | const v8::HandleScope handle_scope(isolate_); | 44 | 44 | const Argv argv; | 45 | | - Env env {handle_scope, argv, this}; | | 45 | + Env env {handle_scope, argv}; | 46 | 46 |
| 47 | 47 | std::string arg{"some args"}; | 48 | 48 | AtExit(*env, at_exit_callback1, static_cast<void*>(&arg)); | @@ -53,8 +53,8 @@ TEST_F(EnvironmentTest, AtExitWithArgument) { | 53 | 53 | TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) { | 54 | 54 | const v8::HandleScope handle_scope(isolate_); | 55 | 55 | const Argv argv; | 56 | | - Env env1 {handle_scope, argv, this}; | 57 | | - Env env2 {handle_scope, argv, this}; | | 56 | + Env env1 {handle_scope, argv}; | | 57 | + Env env2 {handle_scope, argv}; | 58 | 58 |
| 59 | 59 | AtExit(*env1, at_exit_callback1); | 60 | 60 | AtExit(*env2, at_exit_callback2); | |
Collapse file Copy file name to clipboardExpand all lines: test/cctest/test_node_postmortem_metadata.cc +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -70,7 +70,7 @@ TEST_F(DebugSymbolsTest, ExternalStringDataOffset) { | 70 | 70 | TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) { | 71 | 71 | const v8::HandleScope handle_scope(isolate_); | 72 | 72 | const Argv argv; | 73 | | - Env env{handle_scope, argv, this}; | | 73 | + Env env{handle_scope, argv}; | 74 | 74 |
| 75 | 75 | v8::Local<v8::Object> object = v8::Object::New(isolate_); | 76 | 76 | node::BaseObject obj(*env, object); | @@ -87,7 +87,7 @@ TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) { | 87 | 87 | TEST_F(DebugSymbolsTest, EnvironmentHandleWrapQueue) { | 88 | 88 | const v8::HandleScope handle_scope(isolate_); | 89 | 89 | const Argv argv; | 90 | | - Env env{handle_scope, argv, this}; | | 90 | + Env env{handle_scope, argv}; | 91 | 91 |
| 92 | 92 | auto expected = reinterpret_cast<uintptr_t>((*env)->handle_wrap_queue()); | 93 | 93 | auto calculated = reinterpret_cast<uintptr_t>(*env) + | @@ -98,7 +98,7 @@ TEST_F(DebugSymbolsTest, EnvironmentHandleWrapQueue) { | 98 | 98 | TEST_F(DebugSymbolsTest, EnvironmentReqWrapQueue) { | 99 | 99 | const v8::HandleScope handle_scope(isolate_); | 100 | 100 | const Argv argv; | 101 | | - Env env{handle_scope, argv, this}; | | 101 | + Env env{handle_scope, argv}; | 102 | 102 |
| 103 | 103 | auto expected = reinterpret_cast<uintptr_t>((*env)->req_wrap_queue()); | 104 | 104 | auto calculated = reinterpret_cast<uintptr_t>(*env) + | @@ -109,7 +109,7 @@ TEST_F(DebugSymbolsTest, EnvironmentReqWrapQueue) { | 109 | 109 | TEST_F(DebugSymbolsTest, HandleWrapList) { | 110 | 110 | const v8::HandleScope handle_scope(isolate_); | 111 | 111 | const Argv argv; | 112 | | - Env env{handle_scope, argv, this}; | | 112 | + Env env{handle_scope, argv}; | 113 | 113 |
| 114 | 114 | uv_tcp_t handle; | 115 | 115 |
| @@ -138,7 +138,7 @@ TEST_F(DebugSymbolsTest, HandleWrapList) { | 138 | 138 | TEST_F(DebugSymbolsTest, ReqWrapList) { | 139 | 139 | const v8::HandleScope handle_scope(isolate_); | 140 | 140 | const Argv argv; | 141 | | - Env env{handle_scope, argv, this}; | | 141 | + Env env{handle_scope, argv}; | 142 | 142 |
| 143 | 143 | auto obj_template = v8::FunctionTemplate::New(isolate_); | 144 | 144 | obj_template->InstanceTemplate()->SetInternalFieldCount(1); | |
|