From fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Dec 2023 21:57:53 +0300 Subject: Switch to build2 --- mysql/truncation/driver.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'mysql/truncation/driver.cxx') 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 // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -34,7 +36,7 @@ main (int argc, char* argv[]) // Test basic operations. // { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_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 o (db->load (3)); + unique_ptr o (db->load (3)); assert (o->str_ == long_str); t.commit (); } @@ -90,7 +92,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr o (db->load (3)); + unique_ptr o (db->load (3)); assert (o->str_ == longer_str); t.commit (); } @@ -102,7 +104,7 @@ main (int argc, char* argv[]) typedef mysql::query query; typedef odb::result result; - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_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 db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_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 p (db->load (1)); + unique_ptr p (db->load (1)); t.commit (); assert (p->vec_ == o.vec_); -- cgit v1.1