Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 174fe0e

Browse files
committed
Don't use make_unique
1 parent d99f351 commit 174fe0e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/planner/plan_util_test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ TEST_F(PlanUtilTests, GetAffectedIndexesTest) {
9696

9797
// An update query affecting both indexes
9898
std::string query_string = "UPDATE test_table SET id = 0;";
99-
std::unique_ptr<Statement> stmt =
100-
std::make_unique<Statement>("UPDATE", query_string);
99+
std::unique_ptr<Statement> stmt(new Statement("UPDATE", query_string));
101100
auto &peloton_parser = parser::PostgresParser::GetInstance();
102101
auto sql_stmt_list = peloton_parser.BuildParseTree(query_string);
103102
auto sql_stmt = sql_stmt_list->GetStatement(0);
@@ -113,7 +112,7 @@ TEST_F(PlanUtilTests, GetAffectedIndexesTest) {
113112

114113
// Update query affecting only one index
115114
query_string = "UPDATE test_table SET first_name = '';";
116-
stmt = std::make_unique<Statement>("UPDATE", query_string);
115+
stmt.reset(new Statement("UPDATE", query_string));
117116
sql_stmt_list = peloton_parser.BuildParseTree(query_string);
118117
sql_stmt = sql_stmt_list->GetStatement(0);
119118
static_cast<parser::UpdateStatement *>(sql_stmt)->TryBindDatabaseName(
@@ -128,7 +127,7 @@ TEST_F(PlanUtilTests, GetAffectedIndexesTest) {
128127

129128
// ====== DELETE statements check ===
130129
query_string = "DELETE FROM test_table;";
131-
stmt = std::make_unique<Statement>("DELETE", query_string);
130+
stmt.reset(new Statement("DELETE", query_string));
132131
sql_stmt_list = peloton_parser.BuildParseTree(query_string);
133132
sql_stmt = sql_stmt_list->GetStatement(0);
134133
static_cast<parser::DeleteStatement *>(sql_stmt)->TryBindDatabaseName(
@@ -143,7 +142,7 @@ TEST_F(PlanUtilTests, GetAffectedIndexesTest) {
143142

144143
// ========= INSERT statements check ==
145144
query_string = "INSERT INTO test_table VALUES (1, 'pel', 'ton');";
146-
stmt = std::make_unique<Statement>("INSERT", query_string);
145+
stmt.reset(new Statement("INSERT", query_string));
147146
sql_stmt_list = peloton_parser.BuildParseTree(query_string);
148147
sql_stmt = sql_stmt_list->GetStatement(0);
149148
static_cast<parser::InsertStatement *>(sql_stmt)->TryBindDatabaseName(

0 commit comments

Comments
 (0)