summaryrefslogtreecommitdiff
path: root/odb-tests/evolution/version/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb-tests/evolution/version/driver.cxx')
-rw-r--r--odb-tests/evolution/version/driver.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/odb-tests/evolution/version/driver.cxx b/odb-tests/evolution/version/driver.cxx
index 236c9b4..cc1b4b9 100644
--- a/odb-tests/evolution/version/driver.cxx
+++ b/odb-tests/evolution/version/driver.cxx
@@ -4,22 +4,24 @@
// Test schema version access via the database instance.
//
-#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/config.hxx> // DATABASE_XXX
-#include <common/common.hxx>
+#include <libcommon/config.hxx> // DATABASE_XXX
+#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;
@@ -28,7 +30,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_version_sv");
+
bool embedded (schema_catalog::exists (*db));
// 1 - base version
@@ -87,7 +92,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object1> o1 (db->load<object1> (1));
+ unique_ptr<object1> o1 (db->load<object1> (1));
object2 o2 (1);
o2.num = o1->num;
db->persist (o2);
@@ -118,7 +123,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object2> o2 (db->load<object2> (1));
+ unique_ptr<object2> o2 (db->load<object2> (1));
assert (o2->num == 123);
t.commit ();
}
@@ -131,9 +136,9 @@ main (int argc, char* argv[])
transaction t (db->begin ());
#ifdef DATABASE_ORACLE
- db->execute ("DROP TABLE \"schema_version\"");
+ db->execute ("DROP TABLE \"evo_version_sv\"");
#else
- db->execute ("DROP TABLE schema_version");
+ db->execute ("DROP TABLE evo_version_sv");
#endif
t.commit ();
}