aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranciszek Malinka <franciszek.malinka@gmail.com>2022-11-11 22:20:25 +0100
committerFranciszek Malinka <franciszek.malinka@gmail.com>2022-11-11 22:20:25 +0100
commitecec6fcbca44caeb0da527bc02584939dff89c2a (patch)
tree130ee8e0a17e04f1217372b9dcd1a48e1ff3b77d
parent77d869e6320d16804ecece08bdd77c677199d245 (diff)
Uncommented tuple_testheap-page-test
-rw-r--r--komfydb/common/tuple_test.cc68
1 files changed, 34 insertions, 34 deletions
diff --git a/komfydb/common/tuple_test.cc b/komfydb/common/tuple_test.cc
index 7d5399d..d0bf2b7 100644
--- a/komfydb/common/tuple_test.cc
+++ b/komfydb/common/tuple_test.cc
@@ -27,38 +27,38 @@ TEST(Tuple, StringConversion) {
EXPECT_EQ(i, 1);
};
-// TEST(Tuple, Comparison) {
-// const std::vector<Type> types1 = {Type::INT, Type::STRING, Type::INT,
-// Type::STRING};
-// const std::vector<Type> types2 = {Type::INT, Type::STRING};
-//
-// const TupleDesc td1(types1), td2(types2);
-//
-// Tuple t1(&td1), t2(&td1), t3(&td1), t4(&td2);
-// ASSERT_TRUE(t1.SetField(0, std::make_unique<IntField>(1)).ok());
-// ASSERT_TRUE(t1.SetField(1, std::make_unique<StringField>("a")).ok());
-// ASSERT_TRUE(t1.SetField(2, std::make_unique<IntField>(2)).ok());
-// ASSERT_TRUE(t1.SetField(3, std::make_unique<StringField>("b")).ok());
-//
-// ASSERT_TRUE(t2.SetField(0, std::make_unique<IntField>(1)).ok());
-// ASSERT_TRUE(t2.SetField(1, std::make_unique<StringField>("a")).ok());
-// ASSERT_TRUE(t2.SetField(2, std::make_unique<IntField>(2)).ok());
-// ASSERT_TRUE(t2.SetField(3, std::make_unique<StringField>("b")).ok());
-//
-// ASSERT_TRUE(t3.SetField(0, std::make_unique<IntField>(1)).ok());
-// ASSERT_TRUE(t3.SetField(1, std::make_unique<StringField>("a")).ok());
-// ASSERT_TRUE(t3.SetField(2, std::make_unique<IntField>(2)).ok());
-// ASSERT_TRUE(t3.SetField(3, std::make_unique<StringField>("c")).ok());
-//
-// ASSERT_TRUE(t4.SetField(0, std::make_unique<IntField>(1)).ok());
-// ASSERT_TRUE(t4.SetField(1, std::make_unique<StringField>("a")).ok());
-//
-// EXPECT_EQ(t1, t1);
-// EXPECT_EQ(t1, t2);
-// EXPECT_EQ(t2, t1);
-// EXPECT_FALSE(t1 != t2);
-// EXPECT_NE(t1, t3);
-// EXPECT_NE(t1, t4);
-// }
-//
+TEST(Tuple, Comparison) {
+ const std::vector<Type> types1 = {Type::INT, Type::STRING, Type::INT,
+ Type::STRING};
+ const std::vector<Type> types2 = {Type::INT, Type::STRING};
+
+ const TupleDesc td1(types1), td2(types2);
+
+ Tuple t1(&td1), t2(&td1), t3(&td1), t4(&td2);
+ ASSERT_TRUE(t1.SetField(0, std::make_unique<IntField>(1)).ok());
+ ASSERT_TRUE(t1.SetField(1, std::make_unique<StringField>("a")).ok());
+ ASSERT_TRUE(t1.SetField(2, std::make_unique<IntField>(2)).ok());
+ ASSERT_TRUE(t1.SetField(3, std::make_unique<StringField>("b")).ok());
+
+ ASSERT_TRUE(t2.SetField(0, std::make_unique<IntField>(1)).ok());
+ ASSERT_TRUE(t2.SetField(1, std::make_unique<StringField>("a")).ok());
+ ASSERT_TRUE(t2.SetField(2, std::make_unique<IntField>(2)).ok());
+ ASSERT_TRUE(t2.SetField(3, std::make_unique<StringField>("b")).ok());
+
+ ASSERT_TRUE(t3.SetField(0, std::make_unique<IntField>(1)).ok());
+ ASSERT_TRUE(t3.SetField(1, std::make_unique<StringField>("a")).ok());
+ ASSERT_TRUE(t3.SetField(2, std::make_unique<IntField>(2)).ok());
+ ASSERT_TRUE(t3.SetField(3, std::make_unique<StringField>("c")).ok());
+
+ ASSERT_TRUE(t4.SetField(0, std::make_unique<IntField>(1)).ok());
+ ASSERT_TRUE(t4.SetField(1, std::make_unique<StringField>("a")).ok());
+
+ EXPECT_EQ(t1, t1);
+ EXPECT_EQ(t1, t2);
+ EXPECT_EQ(t2, t1);
+ EXPECT_FALSE(t1 != t2);
+ EXPECT_NE(t1, t3);
+ EXPECT_NE(t1, t4);
+}
+
}; // namespace