aboutsummaryrefslogtreecommitdiff
path: root/common/template/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:57:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:57:53 +0200
commitca42db0da0d12b1dcdee1cc82dbbd171131cb628 (patch)
tree166fb9b3d51f686688da9ff86c5a51f3cc36a477 /common/template/driver.cxx
parentbdb7fa4620c9950b16e8292c22424bbf15a25613 (diff)
Initial set of tests
Diffstat (limited to 'common/template/driver.cxx')
-rw-r--r--common/template/driver.cxx43
1 files changed, 43 insertions, 0 deletions
diff --git a/common/template/driver.cxx b/common/template/driver.cxx
new file mode 100644
index 0000000..0361c13
--- /dev/null
+++ b/common/template/driver.cxx
@@ -0,0 +1,43 @@
+// file : common/template/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <memory> // std::auto_ptr
+#include <cassert>
+#include <iostream>
+
+#include <odb/database.hxx>
+#include <odb/transaction.hxx>
+
+#include <common.hxx>
+
+#include "test.hxx"
+#include "test-odb.hxx"
+
+using namespace std;
+using namespace odb;
+
+using odb::shared_ptr;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ auto_ptr<database> db (create_database (argc, argv));
+
+ //
+ //
+ cout << "test 001" << endl;
+ {
+ transaction t (db->begin_transaction ());
+ t.commit ();
+ }
+ }
+ catch (const odb::exception& e)
+ {
+ cerr << e.what () << endl;
+ return 1;
+ }
+}