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

Commit

Permalink
Fix scattered discrepancies
Browse files Browse the repository at this point in the history
  • Loading branch information
schedutron committed May 10, 2018
1 parent 2f28acc commit fd0f23d
Show file tree
Hide file tree
Showing 31 changed files with 114 additions and 114 deletions.
8 changes: 4 additions & 4 deletions test/binder/binder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void SetupTables(std::string database_name) {
}
}

TEST_F(BinderCorrectnessTest, SelectStatementTest) {
TEST_F(BinderCorrectnessTests, SelectStatementTest) {
std::string default_database_name = "test_db";
SetupTables(default_database_name);
auto &parser = parser::PostgresParser::GetInstance();
Expand Down Expand Up @@ -250,7 +250,7 @@ TEST_F(BinderCorrectnessTest, SelectStatementTest) {
// instead of TupleValueExpression to represent column. We can only add this
// test after UpdateStatement is changed

TEST_F(BinderCorrectnessTest, DeleteStatementTest) {
TEST_F(BinderCorrectnessTests, DeleteStatementTest) {
std::string default_database_name = "test_db";
SetupTables(default_database_name);
auto &parser = parser::PostgresParser::GetInstance();
Expand Down Expand Up @@ -292,7 +292,7 @@ TEST_F(BinderCorrectnessTest, DeleteStatementTest) {
txn_manager.CommitTransaction(txn);
}

TEST_F(BinderCorrectnessTest, BindDepthTest) {
TEST_F(BinderCorrectnessTests, BindDepthTest) {
std::string default_database_name = "test_db";
SetupTables(default_database_name);
auto &parser = parser::PostgresParser::GetInstance();
Expand Down Expand Up @@ -382,7 +382,7 @@ TEST_F(BinderCorrectnessTest, BindDepthTest) {
txn_manager.CommitTransaction(txn);
}

TEST_F(BinderCorrectnessTest, FunctionExpressionTest) {
TEST_F(BinderCorrectnessTests, FunctionExpressionTest) {
auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
auto txn = txn_manager.BeginTransaction();

Expand Down
2 changes: 1 addition & 1 deletion test/catalog/catalog_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ TEST_F(CatalogTests, TableObjectTest) {
txn_manager.CommitTransaction(txn);
}

TEST_F(CatalogTests, TestingNamespace) {
TEST_F(CatalogTests, TestingNamespaceTest) {
EXPECT_EQ(ResultType::SUCCESS, TestingSQLUtil::ExecuteSQLQuery("begin;"));
// create namespaces emp_ns0 and emp_ns1
EXPECT_EQ(ResultType::SUCCESS, TestingSQLUtil::ExecuteSQLQuery(
Expand Down
4 changes: 2 additions & 2 deletions test/codegen/block_nested_loop_join_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type::Value BlockNestedLoopJoinTranslatorTest::GetCol(const AbstractTuple &t,
return t.GetValue(static_cast<oid_t>(p));
}

TEST_F(BlockNestedLoopJoinTranslatorTest, SingleColumnEqualityJoinTest) {
TEST_F(BlockNestedLoopJoinTranslatorTests, SingleColumnEqualityJoinTest) {
{
LOG_INFO(
"Testing: "
Expand Down Expand Up @@ -170,7 +170,7 @@ TEST_F(BlockNestedLoopJoinTranslatorTest, SingleColumnEqualityJoinTest) {
}
}

TEST_F(BlockNestedLoopJoinTranslatorTest, NonEqualityJoinTest) {
TEST_F(BlockNestedLoopJoinTranslatorTests, NonEqualityJoinTest) {
// The left and right input tables have the same schema and data distribution.
// The test table has four columns: A, B, D, E. The values in column B, D, E
// are 1, 2, and 3 more than the values in the A column, respectively. Values
Expand Down
4 changes: 2 additions & 2 deletions test/codegen/bloom_filter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class BloomFilterCodegenTests : public PelotonTest {
const std::string table2_name = "test2";
};

TEST_F(BloomFilterCodegenTest, FalsePositiveRateTest) {
TEST_F(BloomFilterCodegenTests, FalsePositiveRateTest) {
codegen::CodeContext code_context;
codegen::CodeGen codegen(code_context);

Expand Down Expand Up @@ -190,7 +190,7 @@ TEST_F(BloomFilterCodegenTest, FalsePositiveRateTest) {

// Testing whether bloom filter can improve the performance of hash join
// when the hash table is bigger than L3 cache and selectivity is low
TEST_F(BloomFilterCodegenTest, PerformanceTest) {
TEST_F(BloomFilterCodegenTests, PerformanceTest) {
auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
auto *catalog = catalog::Catalog::GetInstance();
auto *txn = txn_manager.BeginTransaction();
Expand Down
4 changes: 2 additions & 2 deletions test/codegen/case_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CaseTranslatorTests : public PelotonCodeGenTest {
uint32_t num_rows_to_insert = 64;
};

TEST_F(CaseTranslatorTest, SimpleCaseTest) {
TEST_F(CaseTranslatorTests, SimpleCaseTest) {
//
// SELECT a, case when a=10 then 1 when else 0 FROM table;
//
Expand Down Expand Up @@ -103,7 +103,7 @@ TEST_F(CaseTranslatorTest, SimpleCaseTest) {
}
}

TEST_F(CaseTranslatorTest, SimpleCaseMoreWhenTest) {
TEST_F(CaseTranslatorTests, SimpleCaseMoreWhenTest) {
//
// SELECT a, case when a=10 then 1 when a=20 then 2 else 0 FROM table;
//
Expand Down
8 changes: 4 additions & 4 deletions test/codegen/delete_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DeleteTranslatorTests : public PelotonCodeGenTest {
uint32_t num_rows_to_insert = 64;
};

TEST_F(DeleteTranslatorTest, DeleteAllTuplesTest) {
TEST_F(DeleteTranslatorTests, DeleteAllTuplesTest) {
//
// DELETE FROM table;
//
Expand All @@ -72,7 +72,7 @@ TEST_F(DeleteTranslatorTest, DeleteAllTuplesTest) {
EXPECT_EQ(0, GetCurrentTableSize(TestTableId1()));
}

TEST_F(DeleteTranslatorTest, DeleteWithSimplePredicateTest) {
TEST_F(DeleteTranslatorTests, DeleteWithSimplePredicateTest) {
//
// DELETE FROM table where a >= 40;
//
Expand Down Expand Up @@ -104,7 +104,7 @@ TEST_F(DeleteTranslatorTest, DeleteWithSimplePredicateTest) {
EXPECT_EQ(4, GetCurrentTableSize(TestTableId2()));
}

TEST_F(DeleteTranslatorTest, DeleteWithCompositePredicateTest) {
TEST_F(DeleteTranslatorTests, DeleteWithCompositePredicateTest) {
//
// DELETE FROM table where a >= 20 and b = 21;
//
Expand Down Expand Up @@ -144,7 +144,7 @@ TEST_F(DeleteTranslatorTest, DeleteWithCompositePredicateTest) {
EXPECT_EQ(NumRowsInTestTable() - 1, GetCurrentTableSize(TestTableId3()));
}

TEST_F(DeleteTranslatorTest, DeleteWithModuloPredicateTest) {
TEST_F(DeleteTranslatorTests, DeleteWithModuloPredicateTest) {
//
// DELETE FROM table where a = b % 1;
//
Expand Down
4 changes: 2 additions & 2 deletions test/codegen/function_builder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace peloton {
namespace test {

class FunctionBuilderTests : public PelotonTest {};
TEST_F(FunctionBuilderTest, ConstructSingleFunctionTest) {
TEST_F(FunctionBuilderTests, ConstructSingleFunctionTest) {
// Generate a function like so:
// define @test() {
// ret i32 44;
Expand All @@ -39,7 +39,7 @@ TEST_F(FunctionBuilderTest, ConstructSingleFunctionTest) {
ASSERT_EQ(fn(), magic_num);
}

TEST_F(FunctionBuilderTest, ConstructNestedFunctionTest) {
TEST_F(FunctionBuilderTests, ConstructNestedFunctionTest) {
// In this test, we want to construct the following scenario:
// define void @test(i32 %a) {
// %tmp = mul i32 %a, i32 44
Expand Down
14 changes: 7 additions & 7 deletions test/codegen/group_by_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GroupByTranslatorTests : public PelotonCodeGenTest {
oid_t TestTableId() const { return test_table_oids[0]; }
};

TEST_F(GroupByTranslatorTest, SingleColumnGroupingTest) {
TEST_F(GroupByTranslatorTests, SingleColumnGroupingTest) {
//
// SELECT a, count(*) FROM table GROUP BY a;
//
Expand Down Expand Up @@ -94,7 +94,7 @@ TEST_F(GroupByTranslatorTest, SingleColumnGroupingTest) {
}
}

TEST_F(GroupByTranslatorTest, MultiColumnGroupingTest) {
TEST_F(GroupByTranslatorTests, MultiColumnGroupingTest) {
//
// SELECT a, b, count(*) FROM table GROUP BY a, b;
//
Expand Down Expand Up @@ -155,7 +155,7 @@ TEST_F(GroupByTranslatorTest, MultiColumnGroupingTest) {
}
}

TEST_F(GroupByTranslatorTest, AverageAggregationTest) {
TEST_F(GroupByTranslatorTests, AverageAggregationTest) {
//
// SELECT a, avg(b) FROM table GROUP BY a;
//
Expand Down Expand Up @@ -207,7 +207,7 @@ TEST_F(GroupByTranslatorTest, AverageAggregationTest) {
EXPECT_EQ(10, results.size());
}

TEST_F(GroupByTranslatorTest, AggregationWithOutputPredicateTest) {
TEST_F(GroupByTranslatorTests, AggregationWithOutputPredicateTest) {
//
// SELECT a, avg(b) as x FROM table GROUP BY a WHERE x > 50;
//
Expand Down Expand Up @@ -267,7 +267,7 @@ TEST_F(GroupByTranslatorTest, AggregationWithOutputPredicateTest) {
EXPECT_EQ(5, results.size());
}

TEST_F(GroupByTranslatorTest, AggregationWithInputPredciateTest) {
TEST_F(GroupByTranslatorTests, AggregationWithInputPredciateTest) {
//
// SELECT a, avg(b) as x FROM table GROUP BY a WHERE a > 50;
//
Expand Down Expand Up @@ -327,7 +327,7 @@ TEST_F(GroupByTranslatorTest, AggregationWithInputPredciateTest) {
EXPECT_EQ(4, results.size());
}

TEST_F(GroupByTranslatorTest, SingleCountStarTest) {
TEST_F(GroupByTranslatorTests, SingleCountStarTest) {
//
// SELECT count(*) FROM table;
//
Expand Down Expand Up @@ -381,7 +381,7 @@ TEST_F(GroupByTranslatorTest, SingleCountStarTest) {
type::ValueFactory::GetBigIntValue(10)) == CmpBool::CmpTrue);
}

TEST_F(GroupByTranslatorTest, MinAndMaxTest) {
TEST_F(GroupByTranslatorTests, MinAndMaxTest) {
//
// SELECT MAX(a), MIN(b) FROM table;
//
Expand Down
2 changes: 1 addition & 1 deletion test/codegen/hash_join_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class HashJoinTranslatorTests : public PelotonCodeGenTest {
}
};

TEST_F(HashJoinTranslatorTest, SingleHashJoinColumnTest) {
TEST_F(HashJoinTranslatorTests, SingleHashJoinColumnTest) {
//
// SELECT
// left_table.a, right_table.a, left_table.b, right_table.c,
Expand Down
8 changes: 4 additions & 4 deletions test/codegen/if_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace peloton {
namespace test {

class IfTests : public PelotonTest {};
TEST_F(IfTest, TestIfOnlyTest) {
TEST_F(IfTests, TestIfOnlyTest) {
const std::string func_name = "TestIfOnly";

// Generate a function like so:
Expand Down Expand Up @@ -73,7 +73,7 @@ TEST_F(IfTest, TestIfOnlyTest) {
EXPECT_EQ(f(2000), 0);
}

TEST_F(IfTest, TestIfInsideLoopTest) {
TEST_F(IfTests, TestIfInsideLoopTest) {
const std::string func_name = "TestIfInsideLoop";
codegen::CodeContext code_context;
codegen::CodeGen cg{code_context};
Expand Down Expand Up @@ -135,7 +135,7 @@ TEST_F(IfTest, TestIfInsideLoopTest) {
ASSERT_EQ(5, f(10));
}

TEST_F(IfTest, BreakTest) {
TEST_F(IfTests, BreakTest) {
const std::string func_name = "TestBreakLoop";
codegen::CodeContext code_context;
codegen::CodeGen cg{code_context};
Expand Down Expand Up @@ -184,7 +184,7 @@ TEST_F(IfTest, BreakTest) {
ASSERT_EQ(5, f(7));
}

TEST_F(IfTest, ComplexNestedIfTest) {
TEST_F(IfTests, ComplexNestedIfTest) {
const std::string func_name = "TestIfOnly";

// Generate a function like so:
Expand Down
8 changes: 4 additions & 4 deletions test/codegen/insert_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InsertTranslatorTests : public PelotonCodeGenTest {
};

// Insert one tuple
TEST_F(InsertTranslatorTest, InsertOneTupleTest) {
TEST_F(InsertTranslatorTests, InsertOneTupleTest) {
// Check the pre-condition
auto table = &GetTestTable(TestTableId1());
auto num_tuples = table->GetTupleCount();
Expand Down Expand Up @@ -100,7 +100,7 @@ TEST_F(InsertTranslatorTest, InsertOneTupleTest) {
}

// Insert all tuples from table2 into table1.
TEST_F(InsertTranslatorTest, InsertScanTranslatorTest) {
TEST_F(InsertTranslatorTests, InsertScanTranslatorTest) {
auto table1 = &GetTestTable(TestTableId1());
auto table2 = &GetTestTable(TestTableId2());

Expand Down Expand Up @@ -166,7 +166,7 @@ TEST_F(InsertTranslatorTest, InsertScanTranslatorTest) {
}

// Insert all tuples from table2 into table1 with null values.
TEST_F(InsertTranslatorTest, InsertScanTranslatorWithNullTest) {
TEST_F(InsertTranslatorTests, InsertScanTranslatorWithNullTest) {
auto table1 = &GetTestTable(TestTableId1());
auto table2 = &GetTestTable(TestTableId2());

Expand Down Expand Up @@ -231,7 +231,7 @@ TEST_F(InsertTranslatorTest, InsertScanTranslatorWithNullTest) {
}

// Insert a tuple from table2 with column order changed, into table1.
TEST_F(InsertTranslatorTest, InsertScanColumnTranslatorTest) {
TEST_F(InsertTranslatorTests, InsertScanColumnTranslatorTest) {
auto table1 = &GetTestTable(TestTableId1());
auto table2 = &GetTestTable(TestTableId2());

Expand Down
8 changes: 4 additions & 4 deletions test/codegen/oa_hash_table_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class OAHashTableTests : public PelotonTest {
int8_t raw_hash_table[sizeof(codegen::util::OAHashTable)];
};

TEST_F(OAHashTableTest, CanInsertKeyValuePairsTest) {
TEST_F(OAHashTableTests, CanInsertKeyValuePairsTest) {
Value v = {3, 4, 5, 6};

uint32_t to_insert = 50000;
Expand All @@ -100,7 +100,7 @@ TEST_F(OAHashTableTest, CanInsertKeyValuePairsTest) {
EXPECT_EQ(to_insert, GetHashTable().NumOccupiedBuckets());
}

TEST_F(OAHashTableTest, CanIterateTest) {
TEST_F(OAHashTableTests, CanIterateTest) {
Value v = {3, 4, 5, 6};

uint32_t to_insert = 50000;
Expand Down Expand Up @@ -145,9 +145,9 @@ TEST_F(OAHashTableTest, CanIterateTest) {
EXPECT_EQ(3, dup_count);
}

TEST_F(OAHashTableTest, CanCodegenProbeOrInsertTest) {}
TEST_F(OAHashTableTests, CanCodegenProbeOrInsertTest) {}

TEST_F(OAHashTableTest, MicroBenchmarkTest) {
TEST_F(OAHashTableTests, MicroBenchmarkTest) {
uint32_t num_runs = 10;

std::vector<Key> keys;
Expand Down
8 changes: 4 additions & 4 deletions test/codegen/order_by_translator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OrderByTranslatorTests : public PelotonCodeGenTest {
oid_t TestTableId() { return test_table_oids[0]; }
};

TEST_F(OrderByTranslatorTest, SingleIntColAscTest) {
TEST_F(OrderByTranslatorTests, SingleIntColAscTest) {
//
// SELECT * FROM test_table ORDER BY a;
//
Expand Down Expand Up @@ -64,7 +64,7 @@ TEST_F(OrderByTranslatorTest, SingleIntColAscTest) {
}));
}

TEST_F(OrderByTranslatorTest, SingleIntColDescTest) {
TEST_F(OrderByTranslatorTests, SingleIntColDescTest) {
//
// SELECT * FROM test_table ORDER BY a DESC;
//
Expand Down Expand Up @@ -101,7 +101,7 @@ TEST_F(OrderByTranslatorTest, SingleIntColDescTest) {
}));
}

TEST_F(OrderByTranslatorTest, MultiIntColAscTest) {
TEST_F(OrderByTranslatorTests, MultiIntColAscTest) {
//
// SELECT * FROM test_table ORDER BY b, a ASC;
//
Expand Down Expand Up @@ -146,7 +146,7 @@ TEST_F(OrderByTranslatorTest, MultiIntColAscTest) {
}));
}

TEST_F(OrderByTranslatorTest, MultiIntColMixedTest) {
TEST_F(OrderByTranslatorTests, MultiIntColMixedTest) {
//
// SELECT * FROM test_table ORDER BY b DESC a ASC;
//
Expand Down
Loading

0 comments on commit fd0f23d

Please sign in to comment.