diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
commit | d9661aebab28abc0ec4fb1e716170d347d56c168 (patch) | |
tree | ecb671ab4b8e299bf5cbb8b2dfeed8a49b65fc06 /tests/Timer_Queue_Test.cpp | |
parent | ea0d28240863caf437a18071bfd03e7b146c5ade (diff) | |
download | ATCD-unlabeled-4.3.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-4.3.2
'unlabeled-4.3.2'.
Diffstat (limited to 'tests/Timer_Queue_Test.cpp')
-rw-r--r-- | tests/Timer_Queue_Test.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp deleted file mode 100644 index f0ec1c90815..00000000000 --- a/tests/Timer_Queue_Test.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// ============================================================================ -// $Id$ - -// -// = LIBRARY -// tests -// -// = FILENAME -// Timer_Queue_Test.cpp -// -// = DESCRIPTION -// This is a simple test of ACE_Timer_Queue. The test sets up a -// bunch of timers and then adds them to a timer queue. The -// functionality of the timer queue is then tested. No command line -// arguments are needed to run the test. -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ - - -#include "ace/Timer_Queue.h" -#include "test_config.h" - -class Example_Handler : public ACE_Event_Handler -{ -public: - virtual int handle_timeout (const ACE_Time_Value &, - const void *arg) - { - ACE_ASSERT ((int) arg == 42); - return 0; - } -}; - -int -main (int, char *[]) -{ - ACE_START_TEST ("Timer_Queue_Test"); - - ACE_Timer_Queue tq; - Example_Handler eh; - - ACE_ASSERT (tq.is_empty ()); - ACE_ASSERT (ACE_Time_Value::zero == ACE_Time_Value (0)); - int timer_id; - - timer_id = tq.schedule (&eh, (const void *) 1, ACE_OS::gettimeofday ()); - tq.schedule (&eh, (const void *) 42, ACE_OS::gettimeofday ()); - tq.schedule (&eh, (const void *) 42, ACE_OS::gettimeofday ()); - tq.cancel (timer_id); - ACE_ASSERT (!tq.is_empty ()); - - tq.expire (ACE_OS::gettimeofday ()); - - tq.schedule (&eh, (const void *) 4, ACE_OS::gettimeofday ()); - tq.schedule (&eh, (const void *) 5, ACE_OS::gettimeofday ()); - tq.cancel (&eh); - ACE_ASSERT (tq.is_empty ()); - tq.expire (ACE_OS::gettimeofday ()); - - ACE_END_TEST; - return 0; -} - |