added index attribute to field class
This commit is contained in:
+3
-1
@@ -8,6 +8,7 @@ TEST_CASE("Field test", "[field]") {
|
||||
sql::field f("name");
|
||||
|
||||
REQUIRE(f.name() == "name");
|
||||
REQUIRE(f.index() == -1);
|
||||
REQUIRE(f.is_null());
|
||||
REQUIRE(!f.is_integer());
|
||||
REQUIRE(!f.is_floating_point());
|
||||
@@ -36,7 +37,8 @@ TEST_CASE("Field test", "[field]") {
|
||||
REQUIRE(bool_val.has_value());
|
||||
REQUIRE(bool_val.value());
|
||||
|
||||
f = utils::blob{ 7,8,6,5,4,3 };
|
||||
f = sql::field("name", utils::blob{ 7,8,6,5,4,3 }, 1);
|
||||
REQUIRE(f.index() == 1);
|
||||
REQUIRE(!f.is_null());
|
||||
REQUIRE(!f.is_integer());
|
||||
REQUIRE(!f.is_floating_point());
|
||||
|
||||
Reference in New Issue
Block a user