| 17 | }; |
| 18 | |
| 19 | int 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 | } |
nothing calls this directly
no test coverage detected