MCPcopy Create free account
hub / github.com/SqliteModernCpp/sqlite_modern_cpp / main

Function main

tests/shared_connection.cc:19–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19int main() {
20 try {
21
22 TmpFile file;
23 database db(file.fname);
24
25 {
26
27 auto con = db.connection();
28
29 {
30 database db2(con);
31 int test = 0;
32 db2 << "select 1" >> test;
33 if(test != 1) exit(EXIT_FAILURE);
34 }
35
36 int test = 0;
37 db << "select 1" >> test;
38 if(test != 1) exit(EXIT_FAILURE);
39
40 }
41
42
43 } catch(sqlite_exception e) {
44 cout << "Unexpected error " << e.what() << endl;
45 exit(EXIT_FAILURE);
46 } catch(...) {
47 cout << "Unknown error\n";
48 exit(EXIT_FAILURE);
49 }
50
51 cout << "OK\n";
52 exit(EXIT_SUCCESS);
53}

Callers

nothing calls this directly

Calls 1

connectionMethod · 0.80

Tested by

no test coverage detected