diff options
Diffstat (limited to 'odb-tests/evolution/drop-index/driver.cxx')
-rw-r--r-- | odb-tests/evolution/drop-index/driver.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/odb-tests/evolution/drop-index/driver.cxx b/odb-tests/evolution/drop-index/driver.cxx index 5ad1cd4..515591d 100644 --- a/odb-tests/evolution/drop-index/driver.cxx +++ b/odb-tests/evolution/drop-index/driver.cxx @@ -4,21 +4,23 @@ // Test dropping an index. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/database.hxx> #include <odb/transaction.hxx> #include <odb/schema-catalog.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test2.hxx" #include "test3.hxx" #include "test2-odb.hxx" #include "test3-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; using namespace odb::core; @@ -27,7 +29,10 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_database (argc, argv, false)); + unique_ptr<database> db (create_database (argc, argv, false)); + + db->schema_version_table ("evo_drop_i_sv"); + bool embedded (schema_catalog::exists (*db)); // 1 - base version @@ -115,9 +120,9 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object> p0 (db->load<object> (0)); - auto_ptr<object> p1 (db->load<object> (1)); - auto_ptr<object> p2 (db->load<object> (2)); + unique_ptr<object> p0 (db->load<object> (0)); + unique_ptr<object> p1 (db->load<object> (1)); + unique_ptr<object> p2 (db->load<object> (2)); assert (p0->num == 123); assert (p1->num == 234); |