diff options
Diffstat (limited to 'odb-tests/boost/common/multi-index/driver.cxx')
-rw-r--r-- | odb-tests/boost/common/multi-index/driver.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/odb-tests/boost/common/multi-index/driver.cxx b/odb-tests/boost/common/multi-index/driver.cxx index a077008..68a022e 100644 --- a/odb-tests/boost/common/multi-index/driver.cxx +++ b/odb-tests/boost/common/multi-index/driver.cxx @@ -4,18 +4,20 @@ // Test Boost multi-index container persistence. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #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; @@ -36,7 +38,7 @@ main (int argc, char* argv[]) try { - auto_ptr<database> db (create_database (argc, argv)); + unique_ptr<database> db (create_database (argc, argv)); for (unsigned short i (0); i < 2; ++i) { @@ -108,9 +110,9 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr<object> e (db->load<object> ("empty")); - auto_ptr<object> m (db->load<object> ("medium")); - auto_ptr<object> f (db->load<object> ("full")); + unique_ptr<object> e (db->load<object> ("empty")); + unique_ptr<object> m (db->load<object> ("medium")); + unique_ptr<object> f (db->load<object> ("full")); t.commit (); assert (empty == *e); @@ -159,9 +161,9 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr<object> e (db->load<object> ("empty")); - auto_ptr<object> m (db->load<object> ("medium")); - auto_ptr<object> f (db->load<object> ("full")); + unique_ptr<object> e (db->load<object> ("empty")); + unique_ptr<object> m (db->load<object> ("medium")); + unique_ptr<object> f (db->load<object> ("full")); t.commit (); assert (empty == *e); |