summaryrefslogtreecommitdiff
path: root/test/cctest/node_test_fixture.h
diff options
context:
space:
mode:
authorgengjiawen <technicalcute@gmail.com>2019-03-07 21:46:54 +0800
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-12 20:34:36 +0100
commit575e086b6667c0bb8c89153891097938744f1f8a (patch)
treeaa5c70a11508b23a8da28d407143dd10021d62bb /test/cctest/node_test_fixture.h
parent90fdf1b0d3811f5e1163d81a403b7e7071d279e5 (diff)
downloadandroid-node-v8-575e086b6667c0bb8c89153891097938744f1f8a.tar.gz
android-node-v8-575e086b6667c0bb8c89153891097938744f1f8a.tar.bz2
android-node-v8-575e086b6667c0bb8c89153891097938744f1f8a.zip
src: apply clang-tidy rule modernize-make-unique
PR-URL: https://github.com/nodejs/node/pull/26493 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/cctest/node_test_fixture.h')
-rw-r--r--test/cctest/node_test_fixture.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/cctest/node_test_fixture.h b/test/cctest/node_test_fixture.h
index 02c1164691..aa218e328a 100644
--- a/test/cctest/node_test_fixture.h
+++ b/test/cctest/node_test_fixture.h
@@ -2,6 +2,7 @@
#define TEST_CCTEST_NODE_TEST_FIXTURE_H_
#include <cstdlib>
+#include <memory>
#include "gtest/gtest.h"
#include "node.h"
#include "node_platform.h"
@@ -77,7 +78,7 @@ class NodeTestFixture : public ::testing::Test {
node::Init(&argc, &argv0, &exec_argc, &exec_argv);
}
- tracing_agent.reset(new node::tracing::Agent());
+ tracing_agent = std::make_unique<node::tracing::Agent>();
node::tracing::TraceEventHelper::SetAgent(tracing_agent.get());
CHECK_EQ(0, uv_loop_init(&current_loop));
platform.reset(static_cast<node::NodePlatform*>(