Skip to content

Commit 8f1aa3c

Browse files
danbevtargos
authored andcommitted
test: use aliases for smart pointers in fixture
PR-URL: #21419 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 7e10697 commit 8f1aa3c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/cctest/node_test_fixture.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
ArrayBufferUniquePtr NodeTestFixture::allocator{nullptr, nullptr};
44
uv_loop_t NodeTestFixture::current_loop;
5-
std::unique_ptr<node::NodePlatform> NodeTestFixture::platform;
6-
std::unique_ptr<v8::TracingController> NodeTestFixture::tracing_controller;
5+
NodePlatformUniquePtr NodeTestFixture::platform;
6+
TracingControllerUniquePtr NodeTestFixture::tracing_controller;

test/cctest/node_test_fixture.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ struct Argv {
5555

5656
using ArrayBufferUniquePtr = std::unique_ptr<node::ArrayBufferAllocator,
5757
decltype(&node::FreeArrayBufferAllocator)>;
58+
using TracingControllerUniquePtr = std::unique_ptr<v8::TracingController>;
59+
using NodePlatformUniquePtr = std::unique_ptr<node::NodePlatform>;
5860

5961
class NodeTestFixture : public ::testing::Test {
6062
protected:
6163
static ArrayBufferUniquePtr allocator;
62-
static std::unique_ptr<v8::TracingController> tracing_controller;
63-
static std::unique_ptr<node::NodePlatform> platform;
64+
static TracingControllerUniquePtr tracing_controller;
65+
static NodePlatformUniquePtr platform;
6466
static uv_loop_t current_loop;
6567
v8::Isolate* isolate_;
6668

0 commit comments

Comments
 (0)