test/lib/sqlite.c
raw| 1 | #include <sqlite3.h> |
| 2 | |
| 3 | #include "sqlite.h" |
| 4 | |
| 5 | void test_sqlite_setup(const MunitParameter params[]) |
| 6 | { |
| 7 | int rc; |
| 8 | (void)params; |
| 9 | rc = sqlite3_initialize(); |
| 10 | if (rc != SQLITE_OK) { |
| 11 | munit_errorf("sqlite_init(): %s", sqlite3_errstr(rc)); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | void test_sqlite_tear_down() |
| 16 | { |
| 17 | int rc; |
| 18 | rc = sqlite3_shutdown(); |
| 19 | if (rc != SQLITE_OK) { |
| 20 | munit_errorf("sqlite_shutdown(): %s", sqlite3_errstr(rc)); |
| 21 | } |
| 22 | } |