fixed field class and all tests
This commit is contained in:
+5
-5
@@ -8,7 +8,7 @@ TEST_CASE("Create empty column", "[column]") {
|
||||
column_definition c("name");
|
||||
|
||||
REQUIRE(c.name() == "name");
|
||||
REQUIRE(c.index() == 0);
|
||||
REQUIRE(c.index() == -1);
|
||||
REQUIRE(c.type() == data_type_t::type_unknown);
|
||||
REQUIRE(c.ref_table().empty());
|
||||
REQUIRE(c.ref_column().empty());
|
||||
@@ -28,7 +28,7 @@ TEST_CASE("Copy and move column", "[column]") {
|
||||
column_definition c("name");
|
||||
c.set(std::string{"george"}, 255);
|
||||
REQUIRE(c.name() == "name");
|
||||
REQUIRE(c.index() == 0);
|
||||
REQUIRE(c.index() == -1);
|
||||
REQUIRE(c.ref_table().empty());
|
||||
REQUIRE(c.ref_column().empty());
|
||||
REQUIRE(c.type() == data_type_t::type_varchar);
|
||||
@@ -37,7 +37,7 @@ TEST_CASE("Copy and move column", "[column]") {
|
||||
|
||||
auto c2 = c;
|
||||
REQUIRE(c2.name() == "name");
|
||||
REQUIRE(c2.index() == 0);
|
||||
REQUIRE(c2.index() == -1);
|
||||
REQUIRE(c2.ref_table().empty());
|
||||
REQUIRE(c2.ref_column().empty());
|
||||
REQUIRE(c2.type() == data_type_t::type_varchar);
|
||||
@@ -46,7 +46,7 @@ TEST_CASE("Copy and move column", "[column]") {
|
||||
|
||||
auto c3 = std::move(c2);
|
||||
REQUIRE(c3.name() == "name");
|
||||
REQUIRE(c3.index() == 0);
|
||||
REQUIRE(c3.index() == -1);
|
||||
REQUIRE(c3.ref_table().empty());
|
||||
REQUIRE(c3.ref_column().empty());
|
||||
REQUIRE(c3.type() == data_type_t::type_varchar);
|
||||
@@ -54,7 +54,7 @@ TEST_CASE("Copy and move column", "[column]") {
|
||||
REQUIRE(c3.attributes().size() == 255);
|
||||
|
||||
REQUIRE(c2.name().empty());
|
||||
REQUIRE(c2.index() == 0);
|
||||
REQUIRE(c2.index() == -1);
|
||||
REQUIRE(c2.ref_table().empty());
|
||||
REQUIRE(c2.ref_column().empty());
|
||||
REQUIRE(c2.type() == data_type_t::type_varchar);
|
||||
|
||||
+2
-1
@@ -9,7 +9,8 @@ TEST_CASE("Field test", "[field]") {
|
||||
|
||||
REQUIRE(f.name() == "name");
|
||||
REQUIRE(f.index() == -1);
|
||||
REQUIRE(f.is_null());
|
||||
REQUIRE(f.is_unknown());
|
||||
REQUIRE(!f.is_null());
|
||||
REQUIRE(!f.is_integer());
|
||||
REQUIRE(!f.is_floating_point());
|
||||
REQUIRE(!f.is_blob());
|
||||
|
||||
Reference in New Issue
Block a user