Skip to content

Commit

Permalink
Add attaching db ctor.
Browse files Browse the repository at this point in the history
  • Loading branch information
yangacer committed Jun 22, 2019
1 parent 445317c commit 91d4799
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ TEST(basic, construct) {
database d(":memory:");
}

TEST(basic, construct_by_existing_db) {
using namespace sqlite3cpp;
sqlite3 *db = nullptr;
sqlite3_open(":memory:", &db);
database d(db);
sqlite3_close(db);
}

TEST_F(DBTest, insert_many) {
struct record {
int i;
Expand Down

0 comments on commit 91d4799

Please sign in to comment.