Skip to content

Commit

Permalink
test: use aliases for smart pointers in fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
danbev committed Jun 26, 2018
1 parent 330b19c commit 1edab2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/cctest/node_test_fixture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

ArrayBufferUniquePtr NodeTestFixture::allocator{nullptr, nullptr};
uv_loop_t NodeTestFixture::current_loop;
std::unique_ptr<node::NodePlatform> NodeTestFixture::platform;
std::unique_ptr<v8::TracingController> NodeTestFixture::tracing_controller;
NodePlatformUniquePtr NodeTestFixture::platform;
TracingControllerUniquePtr NodeTestFixture::tracing_controller;
6 changes: 4 additions & 2 deletions test/cctest/node_test_fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ struct Argv {

using ArrayBufferUniquePtr = std::unique_ptr<node::ArrayBufferAllocator,
decltype(&node::FreeArrayBufferAllocator)>;
using TracingControllerUniquePtr = std::unique_ptr<v8::TracingController>;
using NodePlatformUniquePtr = std::unique_ptr<node::NodePlatform>;

class NodeTestFixture : public ::testing::Test {
protected:
static ArrayBufferUniquePtr allocator;
static std::unique_ptr<v8::TracingController> tracing_controller;
static std::unique_ptr<node::NodePlatform> platform;
static TracingControllerUniquePtr tracing_controller;
static NodePlatformUniquePtr platform;
static uv_loop_t current_loop;
v8::Isolate* isolate_;

Expand Down

0 comments on commit 1edab2d

Please sign in to comment.