diff options
Diffstat (limited to 'tests/test_database.cpp')
-rw-r--r-- | tests/test_database.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_database.cpp b/tests/test_database.cpp new file mode 100644 index 0000000..da11cb9 --- /dev/null +++ b/tests/test_database.cpp @@ -0,0 +1,25 @@ +/* + * test_database.cpp + * + * Created on: 28.10.2012 + * Author: savop + */ + +#include <iostream> +#include "../include/db/connection.h" + +int main(){ + + try { + db::Connection connection = db::Connect("/tmp/test_db.sqlite"); + + connection.BeginTransaction(); + + connection.RollbackTransaction(); + + } catch (const db::SQLiteException& e){ + std::cerr << "Exception: "<< e.what() << std::endl; + } + + return 0; +} |