summaryrefslogtreecommitdiff
path: root/common/inheritance/reuse/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-12-13 21:57:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-01-23 21:20:44 +0300
commitfc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch)
tree6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /common/inheritance/reuse/driver.cxx
parent02367faedb16b6186e8852de47e5b749dc48c2df (diff)
Switch to build2
Diffstat (limited to 'common/inheritance/reuse/driver.cxx')
-rw-r--r--common/inheritance/reuse/driver.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/common/inheritance/reuse/driver.cxx b/common/inheritance/reuse/driver.cxx
index 616c6a4..e6122bb 100644
--- a/common/inheritance/reuse/driver.cxx
+++ b/common/inheritance/reuse/driver.cxx
@@ -4,18 +4,20 @@
// Test reuse object inheritance.
//
-#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;
@@ -24,7 +26,7 @@ main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_database (argc, argv));
+ unique_ptr<database> db (create_database (argc, argv));
base b;
b.comp_.bools.push_back (true);
@@ -99,7 +101,7 @@ main (int argc, char* argv[])
reference r;
r.o1_ = &o1;
- empty e;
+ empty_object e;
e.comp_.bools.push_back (true);
e.comp_.bools.push_back (true);
e.comp_.obools.push_back (true);
@@ -134,12 +136,12 @@ main (int argc, char* argv[])
//
{
transaction t (db->begin ());
- auto_ptr<base> lb (db->load<base> (b.id_));
- auto_ptr<object1> lo1 (db->load<object1> (o1.id_));
- auto_ptr<object2> lo2 (db->load<object2> (o2.id_));
- auto_ptr<object3> lo3 (db->load<object3> (o3.id_));
- auto_ptr<empty> le (db->load<empty> (e.id_));
- auto_ptr<reference> lr (db->load<reference> (r.id_));
+ unique_ptr<base> lb (db->load<base> (b.id_));
+ unique_ptr<object1> lo1 (db->load<object1> (o1.id_));
+ unique_ptr<object2> lo2 (db->load<object2> (o2.id_));
+ unique_ptr<object3> lo3 (db->load<object3> (o3.id_));
+ unique_ptr<empty_object> le (db->load<empty_object> (e.id_));
+ unique_ptr<reference> lr (db->load<reference> (r.id_));
t.commit ();
assert (b == *lb);