File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,17 @@ TEST(Database, ctorExecCreateDropExist) {
64
64
}
65
65
66
66
#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
+
67
73
TEST (Database, moveConstructor) {
68
74
remove (" test.db3" );
69
75
{
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" );
72
78
EXPECT_FALSE (db.tableExists (" test" ));
73
79
EXPECT_TRUE (db.getHandle () != NULL );
74
80
SQLite::Database moved = std::move (db);
@@ -78,6 +84,7 @@ TEST(Database, moveConstructor) {
78
84
} // Close DB test.db3
79
85
remove (" test.db3" );
80
86
}
87
+
81
88
#endif
82
89
83
90
TEST (Database, createCloseReopen) {
You can’t perform that action at this time.
0 commit comments