Skip to content

Commit

Permalink
add unit test "create table with unique on sqlite"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacyking committed Jul 11, 2023
1 parent 4349e53 commit 20c3c5c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_ormpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,17 @@ TEST_CASE("orm_aop") {
// REQUIRE(r);
}

#ifdef ORMPP_ENABLE_SQLITE3
TEST_CASE("test create table with unique") {
dbng<sqlite> sqlite;
if (sqlite.connect(db)) {
sqlite.execute("drop table if exists person");
CHECK(sqlite.create_datatable<person>(ormpp_auto_key{"id"},
ormpp_unique{"name"}));
}
}
#endif

#ifdef ORMPP_ENABLE_MYSQL
struct image {
int id;
Expand Down

0 comments on commit 20c3c5c

Please sign in to comment.