summaryrefslogtreecommitdiff
path: root/odb-tests/boost/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/boost/pgsql/date-time/driver.cxx
parent71be31b2c14a2d72ff9d301be848d4c5f9e8023d (diff)
Add boost/ and qt/ to odb-tests and odb-examples
Diffstat (limited to 'odb-tests/boost/pgsql/date-time/driver.cxx')
-rw-r--r--odb-tests/boost/pgsql/date-time/driver.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/odb-tests/boost/pgsql/date-time/driver.cxx b/odb-tests/boost/pgsql/date-time/driver.cxx
index 94fcc46..010d5fe 100644
--- a/odb-tests/boost/pgsql/date-time/driver.cxx
+++ b/odb-tests/boost/pgsql/date-time/driver.cxx
@@ -4,14 +4,13 @@
// Test boost date/time type persistence. PostgreSQL version.
//
-#include <memory> // std::auto_ptr
-#include <cassert>
+#include <memory> // std::unique_ptr
#include <iostream>
#include <odb/pgsql/database.hxx>
#include <odb/pgsql/transaction.hxx>
-#include <common/common.hxx>
+#include <libcommon/common.hxx>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
@@ -19,6 +18,9 @@
#include "test.hxx"
#include "test-odb.hxx"
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace boost::gregorian;
@@ -27,17 +29,17 @@ using namespace boost::posix_time;
using namespace odb::core;
bool
-test_invalid_special_value (object&, auto_ptr<database>&);
+test_invalid_special_value (object&, unique_ptr<database>&);
bool
-test_out_of_range_value (object&, auto_ptr<database>&);
+test_out_of_range_value (object&, unique_ptr<database>&);
int
main (int argc, char* argv[])
{
try
{
- auto_ptr<database> db (create_database (argc, argv));
+ unique_ptr<database> db (create_database (argc, argv));
object o;
@@ -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);
@@ -127,7 +129,7 @@ main (int argc, char* argv[])
}
bool
-test_invalid_special_value (object& x, auto_ptr<database>& db)
+test_invalid_special_value (object& x, unique_ptr<database>& db)
{
try
{
@@ -142,7 +144,7 @@ test_invalid_special_value (object& x, auto_ptr<database>& db)
}
bool
-test_out_of_range_value (object& x, auto_ptr<database>& db)
+test_out_of_range_value (object& x, unique_ptr<database>& db)
{
try
{