summaryrefslogtreecommitdiff
path: root/ACE/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-08 08:51:53 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-12-08 08:51:53 +0100
commit1bfb8257580a2a84da95ca00863f356474eca77a (patch)
treeab7fc58af54e22210eea3d678f86d1c395f295dc /ACE/tests
parent4584f1597edc14464b396c712b517543d18fb0b6 (diff)
downloadATCD-1bfb8257580a2a84da95ca00863f356474eca77a.tar.gz
Use std::unique_ptr
Diffstat (limited to 'ACE/tests')
-rw-r--r--ACE/tests/Bug_1890_Regression_Test.cpp2
-rw-r--r--ACE/tests/Future_Set_Test.cpp2
-rw-r--r--ACE/tests/Future_Test.cpp2
-rw-r--r--ACE/tests/Malloc_Test.cpp2
-rw-r--r--ACE/tests/Network_Adapters_Test.cpp2
-rw-r--r--ACE/tests/Notify_Performance_Test.cpp6
-rw-r--r--ACE/tests/Priority_Reactor_Test.cpp6
-rw-r--r--ACE/tests/Proactor_Timer_Test.cpp2
-rw-r--r--ACE/tests/Reactor_Notify_Test.cpp4
-rw-r--r--ACE/tests/Reactor_Performance_Test.cpp6
-rw-r--r--ACE/tests/Reactor_Remove_Resume_Test.cpp6
-rw-r--r--ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp6
-rw-r--r--ACE/tests/Reactor_Timer_Test.cpp2
-rw-r--r--ACE/tests/Refcounted_Auto_Ptr_Test.cpp4
14 files changed, 26 insertions, 26 deletions
diff --git a/ACE/tests/Bug_1890_Regression_Test.cpp b/ACE/tests/Bug_1890_Regression_Test.cpp
index 492b246937d..09cacb47b1f 100644
--- a/ACE/tests/Bug_1890_Regression_Test.cpp
+++ b/ACE/tests/Bug_1890_Regression_Test.cpp
@@ -101,7 +101,7 @@ run_main (int, ACE_TCHAR *[])
// regardless of platform.
ACE_Select_Reactor *impl_ptr = 0;
ACE_NEW_RETURN (impl_ptr, ACE_Select_Reactor, -1);
- unique_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
+ std::unique_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
ACE_Reactor reactor (impl_ptr);
diff --git a/ACE/tests/Future_Set_Test.cpp b/ACE/tests/Future_Set_Test.cpp
index bd5706e3da7..2549e25cd1c 100644
--- a/ACE/tests/Future_Set_Test.cpp
+++ b/ACE/tests/Future_Set_Test.cpp
@@ -283,7 +283,7 @@ Prime_Scheduler::svc (void)
{
// Dequeue the next method request (we use an auto pointer in
// case an exception is thrown in the <call>).
- unique_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ());
+ std::unique_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ());
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) calling method request\n")));
diff --git a/ACE/tests/Future_Test.cpp b/ACE/tests/Future_Test.cpp
index 55f170d0e37..f930ee3dad1 100644
--- a/ACE/tests/Future_Test.cpp
+++ b/ACE/tests/Future_Test.cpp
@@ -289,7 +289,7 @@ Prime_Scheduler::svc (void)
{
// Dequeue the next method request (we use an auto pointer in
// case an exception is thrown in the <call>).
- unique_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ());
+ std::unique_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ());
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) calling method request\n")));
diff --git a/ACE/tests/Malloc_Test.cpp b/ACE/tests/Malloc_Test.cpp
index 450f881a727..0b0aed0285a 100644
--- a/ACE/tests/Malloc_Test.cpp
+++ b/ACE/tests/Malloc_Test.cpp
@@ -87,7 +87,7 @@ static const void *CHILD_BASE_ADDR =
static MALLOC *
myallocator (const void *base_addr = 0)
{
- static unique_ptr<MALLOC> static_allocator;
+ static std::unique_ptr<MALLOC> static_allocator;
if (static_allocator.get () == 0)
{
diff --git a/ACE/tests/Network_Adapters_Test.cpp b/ACE/tests/Network_Adapters_Test.cpp
index efedaba8c77..bb2ddd525fc 100644
--- a/ACE/tests/Network_Adapters_Test.cpp
+++ b/ACE/tests/Network_Adapters_Test.cpp
@@ -1046,7 +1046,7 @@ run_main (int argc, ACE_TCHAR *argv[])
// to do it right in at least one test. Notice the lack of
// ACE_NEW_RETURN, that monstrosity has no business in proper C++
// code ...
- unique_ptr<ACE_Timer_Heap_Variable_Time_Source> tq(
+ std::unique_ptr<ACE_Timer_Heap_Variable_Time_Source> tq(
new ACE_Timer_Heap_Variable_Time_Source);
// ... notice how the policy is in the derived timer queue type.
// The abstract timer queue does not have a time policy ...
diff --git a/ACE/tests/Notify_Performance_Test.cpp b/ACE/tests/Notify_Performance_Test.cpp
index 5d30ca5f166..676fa8f3055 100644
--- a/ACE/tests/Notify_Performance_Test.cpp
+++ b/ACE/tests/Notify_Performance_Test.cpp
@@ -193,14 +193,14 @@ run_main (int argc, ACE_TCHAR *argv[])
create_reactor ();
// Manage memory automagically.
- unique_ptr<ACE_Reactor> reactor (ACE_Reactor::instance ());
- unique_ptr<ACE_Reactor_Impl> impl;
+ std::unique_ptr<ACE_Reactor> reactor (ACE_Reactor::instance ());
+ std::unique_ptr<ACE_Reactor_Impl> impl;
// If we are using other that the default implementation, we must
// clean up.
if (opt_select_reactor || opt_wfmo_reactor || opt_dev_poll_reactor)
{
- unique_ptr<ACE_Reactor_Impl> auto_impl (ACE_Reactor::instance ()->implementation ());
+ std::unique_ptr<ACE_Reactor_Impl> auto_impl (ACE_Reactor::instance ()->implementation ());
impl = std::move(auto_impl);
}
diff --git a/ACE/tests/Priority_Reactor_Test.cpp b/ACE/tests/Priority_Reactor_Test.cpp
index 493be83e9ff..36915b6c9bc 100644
--- a/ACE/tests/Priority_Reactor_Test.cpp
+++ b/ACE/tests/Priority_Reactor_Test.cpp
@@ -273,18 +273,18 @@ run_main (int argc, ACE_TCHAR *argv[])
// Note: If opt_priority_reactor is false, the default ACE_Reactor is used
// and we don't need to set one up.
ACE_Reactor *orig_reactor = 0;
- unique_ptr<ACE_Reactor> reactor;
+ std::unique_ptr<ACE_Reactor> reactor;
if (opt_priority_reactor)
{
ACE_Select_Reactor *impl_ptr;
ACE_NEW_RETURN (impl_ptr, ACE_Priority_Reactor, -1);
- unique_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
+ std::unique_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
ACE_Reactor *reactor_ptr;
ACE_NEW_RETURN (reactor_ptr, ACE_Reactor (impl_ptr, 1), -1);
auto_impl.release (); // ACE_Reactor dtor will take it from here
- unique_ptr<ACE_Reactor> auto_reactor (reactor_ptr);
+ std::unique_ptr<ACE_Reactor> auto_reactor (reactor_ptr);
reactor = std::move(auto_reactor);
orig_reactor = ACE_Reactor::instance (reactor_ptr);
}
diff --git a/ACE/tests/Proactor_Timer_Test.cpp b/ACE/tests/Proactor_Timer_Test.cpp
index a1504f02f5c..0897cf6849b 100644
--- a/ACE/tests/Proactor_Timer_Test.cpp
+++ b/ACE/tests/Proactor_Timer_Test.cpp
@@ -310,7 +310,7 @@ run_main (int argc, ACE_TCHAR *[])
// code ...
typedef ACE_Timer_Heap_T<ACE_Handler*,ACE_Proactor_Handle_Timeout_Upcall,ACE_SYNCH_RECURSIVE_MUTEX,ACE_FPointer_Time_Policy> Timer_Queue;
- unique_ptr<Timer_Queue> tq(new Timer_Queue);
+ std::unique_ptr<Timer_Queue> tq(new Timer_Queue);
// ... notice how the policy is in the derived timer queue type.
// The abstract timer queue does not have a time policy ...
tq->set_time_policy(&ACE_High_Res_Timer::gettimeofday_hr);
diff --git a/ACE/tests/Reactor_Notify_Test.cpp b/ACE/tests/Reactor_Notify_Test.cpp
index 41ff9e0b573..360f956f423 100644
--- a/ACE/tests/Reactor_Notify_Test.cpp
+++ b/ACE/tests/Reactor_Notify_Test.cpp
@@ -364,7 +364,7 @@ run_test (int disable_notify_pipe,
-1);
// Make sure this stuff gets cleaned up when this function exits.
- unique_ptr<ACE_Reactor> r (reactor);
+ std::unique_ptr<ACE_Reactor> r (reactor);
// Set the Singleton Reactor.
ACE_Reactor *orig_reactor = ACE_Reactor::instance (reactor);
@@ -465,7 +465,7 @@ run_notify_purge_test (void)
Purged_Notify *n2;
ACE_NEW_RETURN (n2, Purged_Notify, -1);
- unique_ptr<Purged_Notify> ap (n2);
+ std::unique_ptr<Purged_Notify> ap (n2);
// First test:
// Notify EXCEPT, and purge ALL
diff --git a/ACE/tests/Reactor_Performance_Test.cpp b/ACE/tests/Reactor_Performance_Test.cpp
index 6d72c2fad47..e388cf2ebf0 100644
--- a/ACE/tests/Reactor_Performance_Test.cpp
+++ b/ACE/tests/Reactor_Performance_Test.cpp
@@ -335,14 +335,14 @@ run_main (int argc, ACE_TCHAR *argv[])
create_reactor ();
// Manage memory automagically.
- unique_ptr<ACE_Reactor> reactor (ACE_Reactor::instance ());
- unique_ptr<ACE_Reactor_Impl> impl;
+ std::unique_ptr<ACE_Reactor> reactor (ACE_Reactor::instance ());
+ std::unique_ptr<ACE_Reactor_Impl> impl;
// If we are using other that the default implementation, we must
// clean up.
if (opt_select_reactor || opt_wfmo_reactor)
{
- unique_ptr<ACE_Reactor_Impl> auto_impl (ACE_Reactor::instance ()->implementation ());
+ std::unique_ptr<ACE_Reactor_Impl> auto_impl (ACE_Reactor::instance ()->implementation ());
impl = std::move(auto_impl);
}
diff --git a/ACE/tests/Reactor_Remove_Resume_Test.cpp b/ACE/tests/Reactor_Remove_Resume_Test.cpp
index b36ebe18cd2..67571d56363 100644
--- a/ACE/tests/Reactor_Remove_Resume_Test.cpp
+++ b/ACE/tests/Reactor_Remove_Resume_Test.cpp
@@ -362,7 +362,7 @@ handle_events (ACE_Reactor & reactor,
// ------------------------------------------------------------
-typedef unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (void);
+typedef std::unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (void);
unique_ptr<ACE_Reactor_Impl>
tp_reactor_factory (void)
@@ -370,7 +370,7 @@ tp_reactor_factory (void)
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("Creating ACE_TP_Reactor.\n")));
- return unique_ptr<ACE_Reactor_Impl> (new ACE_TP_Reactor);
+ return std::unique_ptr<ACE_Reactor_Impl> (new ACE_TP_Reactor);
}
// ------------------------------------------------------------
@@ -412,7 +412,7 @@ struct Run_Test : public std::unary_function<reactor_factory_type, void>
ACE_TEXT ("** Running removal test **\n")));
}
- unique_ptr<ACE_Reactor_Impl> the_factory (factory ());
+ std::unique_ptr<ACE_Reactor_Impl> the_factory (factory ());
ACE_Reactor reactor (the_factory.get ());
// In this test, it's only okay to close the Bogus_Handler
diff --git a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
index 0295bdd08a8..29b01c1d57c 100644
--- a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
+++ b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
@@ -366,7 +366,7 @@ handle_events (ACE_Reactor & reactor,
// ------------------------------------------------------------
-typedef unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (void);
+typedef std::unique_ptr<ACE_Reactor_Impl> (*reactor_factory_type) (void);
unique_ptr<ACE_Reactor_Impl>
dev_poll_reactor_factory (void)
@@ -374,7 +374,7 @@ dev_poll_reactor_factory (void)
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("Creating ACE_Dev_Poll_Reactor.\n")));
- return unique_ptr<ACE_Reactor_Impl> (new ACE_Dev_Poll_Reactor);
+ return std::unique_ptr<ACE_Reactor_Impl> (new ACE_Dev_Poll_Reactor);
}
// ------------------------------------------------------------
@@ -416,7 +416,7 @@ struct Run_Test : public std::unary_function<reactor_factory_type, void>
ACE_TEXT ("** Running removal test **\n")));
}
- unique_ptr<ACE_Reactor_Impl> the_factory (factory ());
+ std::unique_ptr<ACE_Reactor_Impl> the_factory (factory ());
ACE_Reactor reactor (the_factory.get ());
// In this test, it's only okay to close the Bogus_Handler
diff --git a/ACE/tests/Reactor_Timer_Test.cpp b/ACE/tests/Reactor_Timer_Test.cpp
index 28db2c61a08..8e51fbf4196 100644
--- a/ACE/tests/Reactor_Timer_Test.cpp
+++ b/ACE/tests/Reactor_Timer_Test.cpp
@@ -255,7 +255,7 @@ run_main (int argc, ACE_TCHAR *[])
// to do it right in at least one test. Notice the lack of
// ACE_NEW_RETURN, that monstrosity has no business in proper C++
// code ...
- unique_ptr<ACE_Timer_Heap_Variable_Time_Source> tq(
+ std::unique_ptr<ACE_Timer_Heap_Variable_Time_Source> tq(
new ACE_Timer_Heap_Variable_Time_Source);
// ... notice how the policy is in the derived timer queue type.
// The abstract timer queue does not have a time policy ...
diff --git a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
index af5b8d89fab..55574c07818 100644
--- a/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
+++ b/ACE/tests/Refcounted_Auto_Ptr_Test.cpp
@@ -238,7 +238,7 @@ Scheduler::svc (void)
ACE_TEXT ("(%t) activation queue shut down\n")));
break;
}
- unique_ptr<ACE_Method_Request> mo (mo_p);
+ std::unique_ptr<ACE_Method_Request> mo (mo_p);
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) calling method request\n")));
@@ -486,7 +486,7 @@ run_main (int, ACE_TCHAR *[])
Scheduler (),
-1);
- unique_ptr<Scheduler> scheduler(scheduler_ptr);
+ std::unique_ptr<Scheduler> scheduler(scheduler_ptr);
if (scheduler->open () == -1)
ACE_ERROR_RETURN ((LM_ERROR,