summaryrefslogtreecommitdiff
path: root/ACE/tests/Timer_Queue_Test.cpp
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-07-30 14:44:22 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-07-30 14:44:22 +0000
commit50c729f6a63d449e729aa9030af55d0e0fb6712d (patch)
treee61a42793ac0e374325e4498a6ae330efeeb73cb /ACE/tests/Timer_Queue_Test.cpp
parentc27bbdb7f01766b7d62b2f5024d43915342e7803 (diff)
downloadATCD-50c729f6a63d449e729aa9030af55d0e0fb6712d.tar.gz
ChangeLogTag: Mon Jul 30 14:45:00 UTC 2007 Simon Massey <sma@prismtech.com>
Diffstat (limited to 'ACE/tests/Timer_Queue_Test.cpp')
-rw-r--r--ACE/tests/Timer_Queue_Test.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/ACE/tests/Timer_Queue_Test.cpp b/ACE/tests/Timer_Queue_Test.cpp
index 1a788f1fc26..2b3e87343a6 100644
--- a/ACE/tests/Timer_Queue_Test.cpp
+++ b/ACE/tests/Timer_Queue_Test.cpp
@@ -169,15 +169,17 @@ test_functionality (ACE_Timer_Queue *tq)
tq->gettimeofday ());
ACE_ASSERT (result != -1);
- ACE_NEW (timer_act, int (42));
+ const void *timer_act1 = 0;
+ ACE_NEW (timer_act1, int (42));
result = tq->schedule (&eh,
- timer_act,
+ timer_act1,
tq->gettimeofday () + ACE_Time_Value (100));
ACE_ASSERT (result != -1);
- ACE_NEW (timer_act, int (42));
+ const void *timer_act2 = 0;
+ ACE_NEW (timer_act2, int (42));
result = tq->schedule (&eh,
- timer_act,
+ timer_act2,
tq->gettimeofday () + ACE_Time_Value (100));
ACE_ASSERT (result != -1);
@@ -194,6 +196,8 @@ test_functionality (ACE_Timer_Queue *tq)
ACE_ASSERT (eh.close_count_ == 2);
ACE_ASSERT (tq->is_empty () != 0);
+ delete (int *) timer_act2;
+ delete (int *) timer_act1;
ACE_NEW (timer_act, int (4));
timer_id = tq->schedule (&eh,
@@ -252,14 +256,14 @@ test_functionality (ACE_Timer_Queue *tq)
ACE_ASSERT (eh.close_count_ == 3);
result = tq->cancel (timer_id, &timer_act);
- delete (int *) timer_act;
ACE_ASSERT (result == 1);
ACE_ASSERT (eh.close_count_ == 3);
+ delete (int *) timer_act;
result = tq->cancel (timer_id2, &timer_act);
- delete (int *) timer_act;
ACE_ASSERT (result == 1);
ACE_ASSERT (eh.close_count_ == 3);
+ delete (int *) timer_act;
result = tq->expire ();
ACE_ASSERT (result == 0);