From ca42db0da0d12b1dcdee1cc82dbbd171131cb628 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Jun 2010 16:57:53 +0200 Subject: Initial set of tests --- common/template/driver.cxx | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 common/template/driver.cxx (limited to 'common/template/driver.cxx') 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 +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include // std::auto_ptr +#include +#include + +#include +#include + +#include + +#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 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; + } +} -- cgit v1.1