summaryrefslogtreecommitdiff
path: root/odb-tests/qt/pgsql/date-time/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-05-08 21:29:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-05-16 10:12:03 +0300
commit5ac802457ccf985b334ee81252c185f1d3e1cfb7 (patch)
tree2011186d74b8d662c146d17c65558ef97ff38169 /odb-tests/qt/pgsql/date-time/driver.cxx
parent71be31b2c14a2d72ff9d301be848d4c5f9e8023d (diff)
Add boost/ and qt/ to odb-tests and odb-examples
Diffstat (limited to 'odb-tests/qt/pgsql/date-time/driver.cxx')
-rw-r--r--odb-tests/qt/pgsql/date-time/driver.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/odb-tests/qt/pgsql/date-time/driver.cxx b/odb-tests/qt/pgsql/date-time/driver.cxx
index 43a676d..f03d48c 100644
--- a/odb-tests/qt/pgsql/date-time/driver.cxx
+++ b/odb-tests/qt/pgsql/date-time/driver.cxx
@@ -4,8 +4,7 @@
// Test Qt date/time type persistence. PostgreSQL version.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <QtCore/QDateTime>
@@ -14,11 +13,14 @@
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/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;
@@ -32,7 +34,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<database> db (create_database (argc, argv));
+ unique_ptr<database> db (create_database (argc, argv));
// Check persistence of null values.
//
@@ -47,7 +49,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object> ol (db->load<object> (o.id));
+ unique_ptr<object> ol (db->load<object> (o.id));
t.commit ();
assert (ol->is_null ());
@@ -72,7 +74,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object> ol (db->load<object> (o.id));
+ unique_ptr<object> ol (db->load<object> (o.id));
t.commit ();
assert (*ol == o);
@@ -93,7 +95,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- auto_ptr<object> ol (db->load<object> (o.id));
+ unique_ptr<object> ol (db->load<object> (o.id));
t.commit ();
assert (*ol == o);