diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-12-13 21:57:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-23 21:20:44 +0300 |
commit | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch) | |
tree | 6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /mysql/truncation/driver.cxx | |
parent | 02367faedb16b6186e8852de47e5b749dc48c2df (diff) |
Switch to build2
Diffstat (limited to 'mysql/truncation/driver.cxx')
-rw-r--r-- | mysql/truncation/driver.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mysql/truncation/driver.cxx b/mysql/truncation/driver.cxx index 9f044e6..21084f5 100644 --- a/mysql/truncation/driver.cxx +++ b/mysql/truncation/driver.cxx @@ -4,19 +4,21 @@ // Test insufficient buffer/truncation handling. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/mysql/database.hxx> #include <odb/mysql/connection.hxx> #include <odb/mysql/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -34,7 +36,7 @@ main (int argc, char* argv[]) // Test basic operations. // { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // Run persist/load so that the initial bindings are established // (version == 0). @@ -72,7 +74,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object2> o (db->load<object2> (3)); + unique_ptr<object2> o (db->load<object2> (3)); assert (o->str_ == long_str); t.commit (); } @@ -90,7 +92,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object2> o (db->load<object2> (3)); + unique_ptr<object2> o (db->load<object2> (3)); assert (o->str_ == longer_str); t.commit (); } @@ -102,7 +104,7 @@ main (int argc, char* argv[]) typedef mysql::query<object1> query; typedef odb::result<object1> result; - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // Run persist/query so that the initial bindings are established // (version == 0). @@ -157,7 +159,7 @@ main (int argc, char* argv[]) // Test containers. // { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // Use different connections to persist and load the object. // @@ -175,7 +177,7 @@ main (int argc, char* argv[]) { transaction t (c2->begin ()); - auto_ptr<container> p (db->load<container> (1)); + unique_ptr<container> p (db->load<container> (1)); t.commit (); assert (p->vec_ == o.vec_); |