summaryrefslogtreecommitdiff
path: root/ACE/tests/Reactor_Notify_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/Reactor_Notify_Test.cpp')
-rw-r--r--ACE/tests/Reactor_Notify_Test.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/ACE/tests/Reactor_Notify_Test.cpp b/ACE/tests/Reactor_Notify_Test.cpp
index 38207bf6aff..08874f291c3 100644
--- a/ACE/tests/Reactor_Notify_Test.cpp
+++ b/ACE/tests/Reactor_Notify_Test.cpp
@@ -35,18 +35,18 @@ static const time_t SHORT_TIMEOUT = 2;
class Quiet_Notify_Tester : public ACE_Task<ACE_NULL_SYNCH>
{
public:
- Quiet_Notify_Tester (void) : result_ (0) {}
- ~Quiet_Notify_Tester (void) { this->wait (); }
+ Quiet_Notify_Tester () : result_ (0) {}
+ ~Quiet_Notify_Tester () override { this->wait (); }
//FUZZ: disable check_for_lack_ACE_OS
/// Start the reactor event thread.
- virtual int open (void * = 0);
+ int open (void * = 0) override;
// Run the reactor event loop.
- virtual int svc (void);
+ int svc () override;
// Return the test result, 0 ok, -1 fail
- int result (void) const { return this->result_; }
+ int result () const { return this->result_; }
private:
ACE_Reactor r_;
@@ -61,7 +61,7 @@ Quiet_Notify_Tester::open (void *)
}
int
-Quiet_Notify_Tester::svc (void)
+Quiet_Notify_Tester::svc ()
{
// Count on the main thread doing a notify in less than LONG_TIMEOUT
// seconds. If we don't get it, report a failure.
@@ -87,7 +87,7 @@ Quiet_Notify_Tester::svc (void)
}
static int
-run_quiet_notify_test (void)
+run_quiet_notify_test ()
{
ACE_DEBUG ((LM_DEBUG, "(%t) Starting quiet notify test\n"));
Quiet_Notify_Tester t;
@@ -113,33 +113,33 @@ public:
const ACE_Time_Value &tv);
/// Destructor.
- ~Supplier_Task (void);
+ ~Supplier_Task () override;
//FUZZ: disable check_for_lack_ACE_OS
/// Make this an Active Object.
- virtual int open (void * = 0);
+ int open (void * = 0) override;
/// Close down the supplier.
///FUZZ: enable check_for_lack_ACE_OS
- virtual int close (u_long);
+ int close (u_long) override;
/// Generates events and sends them to the <Reactor>'s <notify>
/// method.
- virtual int svc (void);
+ int svc () override;
/// Releases the <waiter_> semaphore when called by the <Reactor>'s
/// notify handler.
- virtual int handle_exception (ACE_HANDLE);
+ int handle_exception (ACE_HANDLE) override;
/**
* Called every time through the main <ACE_Reactor> event loop to
* illustrate the difference between "limited" and "unlimited"
* notification.
*/
- virtual int handle_output (ACE_HANDLE);
+ int handle_output (ACE_HANDLE) override;
/// Release the <waiter_>.
- void release (void);
+ void release ();
private:
/// Perform the notifications.
@@ -169,7 +169,7 @@ private:
};
void
-Supplier_Task::release (void)
+Supplier_Task::release ()
{
this->waiter_.release ();
}
@@ -235,7 +235,7 @@ Supplier_Task::close (u_long)
return 0;
}
-Supplier_Task::~Supplier_Task (void)
+Supplier_Task::~Supplier_Task ()
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) ~Supplier_Task\n")));
@@ -292,7 +292,7 @@ Supplier_Task::perform_notifications (int notifications)
}
int
-Supplier_Task::svc (void)
+Supplier_Task::svc ()
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%t) **** starting unlimited notifications test\n")));
@@ -364,7 +364,7 @@ run_test (int disable_notify_pipe,
-1);
// Make sure this stuff gets cleaned up when this function exits.
- auto_ptr<ACE_Reactor> r (reactor);
+ std::unique_ptr<ACE_Reactor> r (reactor);
// Set the Singleton Reactor.
ACE_Reactor *orig_reactor = ACE_Reactor::instance (reactor);
@@ -447,7 +447,7 @@ run_test (int disable_notify_pipe,
class Purged_Notify : public ACE_Event_Handler
{
- virtual int handle_exception (ACE_HANDLE = ACE_INVALID_HANDLE)
+ int handle_exception (ACE_HANDLE = ACE_INVALID_HANDLE) override
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Got a notify that should have been purged!\n")),
@@ -456,7 +456,7 @@ class Purged_Notify : public ACE_Event_Handler
};
static int
-run_notify_purge_test (void)
+run_notify_purge_test ()
{
int status;
ACE_Reactor *r = ACE_Reactor::instance ();
@@ -465,7 +465,7 @@ run_notify_purge_test (void)
Purged_Notify *n2;
ACE_NEW_RETURN (n2, Purged_Notify, -1);
- auto_ptr<Purged_Notify> ap (n2);
+ std::unique_ptr<Purged_Notify> ap (n2);
// First test:
// Notify EXCEPT, and purge ALL