File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,17 @@ TEST(Database, ctorExecCreateDropExist) {
6464}
6565
6666#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
67+
68+ SQLite::Database DatabaseBuilder (const char * apName)
69+ {
70+ return SQLite::Database (apName, SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);
71+ }
72+
6773TEST (Database, moveConstructor) {
6874 remove (" test.db3" );
6975 {
70- // Create a new database
71- SQLite::Database db (" test.db3" , SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE );
76+ // Create a new database, using the move constructor
77+ SQLite::Database db = DatabaseBuilder (" test.db3" );
7278 EXPECT_FALSE (db.tableExists (" test" ));
7379 EXPECT_TRUE (db.getHandle () != NULL );
7480 SQLite::Database moved = std::move (db);
@@ -78,6 +84,7 @@ TEST(Database, moveConstructor) {
7884 } // Close DB test.db3
7985 remove (" test.db3" );
8086}
87+
8188#endif
8289
8390TEST (Database, createCloseReopen) {
You can’t perform that action at this time.
0 commit comments