diff options
Diffstat (limited to 'common/virtual/driver.cxx')
-rw-r--r-- | common/virtual/driver.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/common/virtual/driver.cxx b/common/virtual/driver.cxx index 35e0923..f96f543 100644 --- a/common/virtual/driver.cxx +++ b/common/virtual/driver.cxx @@ -5,18 +5,20 @@ // #include <memory> // std::auto_ptr -#include <cassert> #include <iostream> #include <odb/session.hxx> #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; using namespace odb::core; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_database (argc, argv)); + unique_ptr<database> db (create_database (argc, argv)); // Test basic virtual data member functionality. // @@ -50,7 +52,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object> p (db->load<object> (o.id1.v)); + unique_ptr<object> p (db->load<object> (o.id1.v)); t.commit (); assert (o == *p); @@ -77,7 +79,7 @@ main (int argc, char* argv[]) { session s; transaction t (db->begin ()); - auto_ptr<object1> p (db->load<object1> (o1.id)); + unique_ptr<object1> p (db->load<object1> (o1.id)); t.commit (); assert (p->o2->id == o1.o2->id); @@ -137,7 +139,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<person> p (db->load<person> (id)); + unique_ptr<person> p (db->load<person> (id)); t.commit (); assert (o.first_ == p->first_ && o.last_ == p->last_); |