diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-02-02 10:35:43 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-02-05 06:58:05 +0100 |
commit | 83c93158fb0e979dbffb4a776d237da0db8f7b08 (patch) | |
tree | 847a0db47f3e118474ffeacc45892a1896683cda /test/cctest | |
parent | b9a873e044045a68104d2c046a272cc87b954301 (diff) | |
download | node-new-83c93158fb0e979dbffb4a776d237da0db8f7b08.tar.gz |
test: remove destructor from node_test_fixture
This commit removes the destructor from node_test_fixture.h which calls
the TearDown function causing TearDown to be called twice. This also
allows us to remove the check of the platform_ in TearDown.
Also the Setup/TearDown functions in AliasBufferTest are removed as they
are not necessary.
PR-URL: https://github.com/nodejs/node/pull/18524
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/cctest')
-rw-r--r-- | test/cctest/node_test_fixture.h | 5 | ||||
-rw-r--r-- | test/cctest/test_aliased_buffer.cc | 11 |
2 files changed, 1 insertions, 15 deletions
diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h index ffecd34d71..48642d5949 100644 --- a/test/cctest/node_test_fixture.h +++ b/test/cctest/node_test_fixture.h @@ -64,10 +64,6 @@ class NodeTestFixture : public ::testing::Test { protected: v8::Isolate* isolate_; - ~NodeTestFixture() { - TearDown(); - } - virtual void SetUp() { CHECK_EQ(0, uv_loop_init(¤t_loop)); platform_ = new node::NodePlatform(8, nullptr); @@ -86,7 +82,6 @@ class NodeTestFixture : public ::testing::Test { } virtual void TearDown() { - if (platform_ == nullptr) return; platform_->Shutdown(); while (uv_loop_alive(¤t_loop)) { uv_run(¤t_loop, UV_RUN_ONCE); diff --git a/test/cctest/test_aliased_buffer.cc b/test/cctest/test_aliased_buffer.cc index 8dfb02c181..0eaddf7735 100644 --- a/test/cctest/test_aliased_buffer.cc +++ b/test/cctest/test_aliased_buffer.cc @@ -5,16 +5,7 @@ using node::AliasedBuffer; -class AliasBufferTest : public NodeTestFixture { - protected: - void SetUp() override { - NodeTestFixture::SetUp(); - } - - void TearDown() override { - NodeTestFixture::TearDown(); - } -}; +class AliasBufferTest : public NodeTestFixture {}; template<class NativeT> void CreateOracleValues(NativeT* buf, size_t count) { |