diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-08 21:29:52 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-16 10:12:03 +0300 |
commit | 5ac802457ccf985b334ee81252c185f1d3e1cfb7 (patch) | |
tree | 2011186d74b8d662c146d17c65558ef97ff38169 /odb-tests/boost/sqlite/date-time/driver.cxx | |
parent | 71be31b2c14a2d72ff9d301be848d4c5f9e8023d (diff) |
Add boost/ and qt/ to odb-tests and odb-examples
Diffstat (limited to 'odb-tests/boost/sqlite/date-time/driver.cxx')
-rw-r--r-- | odb-tests/boost/sqlite/date-time/driver.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/odb-tests/boost/sqlite/date-time/driver.cxx b/odb-tests/boost/sqlite/date-time/driver.cxx index 97a7a0c..c630255 100644 --- a/odb-tests/boost/sqlite/date-time/driver.cxx +++ b/odb-tests/boost/sqlite/date-time/driver.cxx @@ -4,14 +4,13 @@ // Test boost date/time type persistence. SQLite version. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/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; @@ -84,7 +86,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); @@ -178,7 +180,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 { @@ -193,7 +195,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 { |