summaryrefslogtreecommitdiff
path: root/test/cctest
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-02-03 18:25:59 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-02-06 06:50:33 +0100
commitca473be461b87a9a6a020d9b78225139251c54c4 (patch)
treea3c4cee651e3dd9a9e54a669ad87e65347f4dcf7 /test/cctest
parentc64e130913a4c1a65b35253fcacf942fc5389223 (diff)
downloadandroid-node-v8-ca473be461b87a9a6a020d9b78225139251c54c4.tar.gz
android-node-v8-ca473be461b87a9a6a020d9b78225139251c54c4.tar.bz2
android-node-v8-ca473be461b87a9a6a020d9b78225139251c54c4.zip
test: remove NodeTestFixture from Env constructor
PR-URL: https://github.com/nodejs/node/pull/18558 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/cctest')
-rw-r--r--test/cctest/node_test_fixture.h4
-rw-r--r--test/cctest/test_environment.cc8
-rw-r--r--test/cctest/test_node_postmortem_metadata.cc10
3 files changed, 10 insertions, 12 deletions
diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h
index eaa4aaecdf..660111c5a9 100644
--- a/test/cctest/node_test_fixture.h
+++ b/test/cctest/node_test_fixture.h
@@ -100,9 +100,7 @@ class EnvironmentTestFixture : public NodeTestFixture {
public:
class Env {
public:
- Env(const v8::HandleScope& handle_scope,
- const Argv& argv,
- NodeTestFixture* test_fixture) {
+ Env(const v8::HandleScope& handle_scope, const Argv& argv) {
auto isolate = handle_scope.GetIsolate();
context_ = node::NewContext(isolate);
CHECK(!context_.IsEmpty());
diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc
index 352fed1fb6..4575d3b65a 100644
--- a/test/cctest/test_environment.cc
+++ b/test/cctest/test_environment.cc
@@ -32,7 +32,7 @@ class EnvironmentTest : public EnvironmentTestFixture {
TEST_F(EnvironmentTest, AtExitWithEnvironment) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env {handle_scope, argv, this};
+ Env env {handle_scope, argv};
AtExit(*env, at_exit_callback1);
RunAtExit(*env);
@@ -42,7 +42,7 @@ TEST_F(EnvironmentTest, AtExitWithEnvironment) {
TEST_F(EnvironmentTest, AtExitWithArgument) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env {handle_scope, argv, this};
+ Env env {handle_scope, argv};
std::string arg{"some args"};
AtExit(*env, at_exit_callback1, static_cast<void*>(&arg));
@@ -53,8 +53,8 @@ TEST_F(EnvironmentTest, AtExitWithArgument) {
TEST_F(EnvironmentTest, MultipleEnvironmentsPerIsolate) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env1 {handle_scope, argv, this};
- Env env2 {handle_scope, argv, this};
+ Env env1 {handle_scope, argv};
+ Env env2 {handle_scope, argv};
AtExit(*env1, at_exit_callback1);
AtExit(*env2, at_exit_callback2);
diff --git a/test/cctest/test_node_postmortem_metadata.cc b/test/cctest/test_node_postmortem_metadata.cc
index 72e6abb585..be5cc7ce8a 100644
--- a/test/cctest/test_node_postmortem_metadata.cc
+++ b/test/cctest/test_node_postmortem_metadata.cc
@@ -50,7 +50,7 @@ TEST_F(DebugSymbolsTest, ExternalStringDataOffset) {
TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env{handle_scope, argv, this};
+ Env env{handle_scope, argv};
v8::Local<v8::Object> object = v8::Object::New(isolate_);
node::BaseObject obj(*env, object);
@@ -67,7 +67,7 @@ TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) {
TEST_F(DebugSymbolsTest, EnvironmentHandleWrapQueue) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env{handle_scope, argv, this};
+ Env env{handle_scope, argv};
auto expected = reinterpret_cast<uintptr_t>((*env)->handle_wrap_queue());
auto calculated = reinterpret_cast<uintptr_t>(*env) +
@@ -78,7 +78,7 @@ TEST_F(DebugSymbolsTest, EnvironmentHandleWrapQueue) {
TEST_F(DebugSymbolsTest, EnvironmentReqWrapQueue) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env{handle_scope, argv, this};
+ Env env{handle_scope, argv};
auto expected = reinterpret_cast<uintptr_t>((*env)->req_wrap_queue());
auto calculated = reinterpret_cast<uintptr_t>(*env) +
@@ -89,7 +89,7 @@ TEST_F(DebugSymbolsTest, EnvironmentReqWrapQueue) {
TEST_F(DebugSymbolsTest, HandleWrapList) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env{handle_scope, argv, this};
+ Env env{handle_scope, argv};
uv_tcp_t handle;
@@ -118,7 +118,7 @@ TEST_F(DebugSymbolsTest, HandleWrapList) {
TEST_F(DebugSymbolsTest, ReqWrapList) {
const v8::HandleScope handle_scope(isolate_);
const Argv argv;
- Env env{handle_scope, argv, this};
+ Env env{handle_scope, argv};
auto obj_template = v8::FunctionTemplate::New(isolate_);
obj_template->InstanceTemplate()->SetInternalFieldCount(1);