-
-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
183 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/statement_serializer_tests/column_constraints/not_null.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <sqlite_orm/sqlite_orm.h> | ||
#include <catch2/catch_all.hpp> | ||
|
||
using namespace sqlite_orm; | ||
|
||
TEST_CASE("statement_serializer not null") { | ||
internal::db_objects_tuple<> storage; | ||
internal::serializer_context<internal::db_objects_tuple<>> context{storage}; | ||
auto statement = not_null(); | ||
auto value = serialize(statement, context); | ||
REQUIRE(value == "NOT NULL"); | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/statement_serializer_tests/column_constraints/null.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <sqlite_orm/sqlite_orm.h> | ||
#include <catch2/catch_all.hpp> | ||
|
||
using namespace sqlite_orm; | ||
|
||
TEST_CASE("statement_serializer null") { | ||
internal::db_objects_tuple<> storage; | ||
internal::serializer_context<internal::db_objects_tuple<>> context{storage}; | ||
auto statement = null(); | ||
auto value = serialize(statement, context); | ||
REQUIRE(value == "NULL"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters