From e34e6034fa9d885d33c6d18d58b40d7bbe5f0203 Mon Sep 17 00:00:00 2001 From: Koschei Date: Sat, 19 Oct 2024 13:51:01 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unittest/observer/aggregate_hash_table_test.cpp | 4 ++-- unittest/observer/expression_test.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/unittest/observer/aggregate_hash_table_test.cpp b/unittest/observer/aggregate_hash_table_test.cpp index c2e997e6..b584a253 100644 --- a/unittest/observer/aggregate_hash_table_test.cpp +++ b/unittest/observer/aggregate_hash_table_test.cpp @@ -32,7 +32,7 @@ TEST(AggregateHashTableTest, DISABLED_standard_hash_table) group_chunk.add_column(std::move(column1), 0); aggr_chunk.add_column(std::move(column2), 1); - AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, nullptr); + AggregateFunctionExpr aggregate_expr(AggregateFunctionType::SUM, nullptr); std::vector aggregate_exprs; aggregate_exprs.push_back(&aggregate_expr); auto standard_hash_table = std::make_unique(aggregate_exprs); @@ -75,7 +75,7 @@ TEST(AggregateHashTableTest, DISABLED_standard_hash_table) aggr_chunk.add_column(std::move(aggr1), 0); aggr_chunk.add_column(std::move(aggr2), 1); - AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, nullptr); + AggregateFunctionExpr aggregate_expr(AggregateFunctionType::SUM, nullptr); std::vector aggregate_exprs; aggregate_exprs.push_back(&aggregate_expr); aggregate_exprs.push_back(&aggregate_expr); diff --git a/unittest/observer/expression_test.cpp b/unittest/observer/expression_test.cpp index e90c3cb7..6149e901 100644 --- a/unittest/observer/expression_test.cpp +++ b/unittest/observer/expression_test.cpp @@ -311,7 +311,7 @@ TEST(AggregateFunctionExpr, aggregate_expr_test) { Value int_value(1); unique_ptr value_expr(new ValueExpr(int_value)); - AggregateFunctionExpr aggregate_expr(AggregateFunctionExpr::Type::SUM, std::move(value_expr)); + AggregateFunctionExpr aggregate_expr(AggregateFunctionType::SUM, std::move(value_expr)); aggregate_expr.equal(aggregate_expr); auto aggregator = aggregate_expr.create_aggregator(); for (int i = 0; i < 100; i++) { @@ -320,17 +320,17 @@ TEST(AggregateFunctionExpr, aggregate_expr_test) Value result; aggregator->evaluate(result); ASSERT_EQ(result.get_int(), 4950); - AggregateFunctionExpr::Type aggr_type; + AggregateFunctionType aggr_type; ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("sum", aggr_type)); - ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::SUM); + ASSERT_EQ(aggr_type, AggregateFunctionType::SUM); ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("count", aggr_type)); - ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::COUNT); + ASSERT_EQ(aggr_type, AggregateFunctionType::COUNT); ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("avg", aggr_type)); - ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::AVG); + ASSERT_EQ(aggr_type, AggregateFunctionType::AVG); ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("max", aggr_type)); - ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::MAX); + ASSERT_EQ(aggr_type, AggregateFunctionType::MAX); ASSERT_EQ(RC::SUCCESS, AggregateFunctionExpr::type_from_string("min", aggr_type)); - ASSERT_EQ(aggr_type, AggregateFunctionExpr::Type::MIN); + ASSERT_EQ(aggr_type, AggregateFunctionType::MIN); ASSERT_EQ(RC::INVALID_ARGUMENT, AggregateFunctionExpr::type_from_string("invalid type", aggr_type)); }