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/Map_Manager_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/Map_Manager_Test.cpp')
-rw-r--r-- | tests/Map_Manager_Test.cpp | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/tests/Map_Manager_Test.cpp b/tests/Map_Manager_Test.cpp deleted file mode 100644 index e059b2bcb9b..00000000000 --- a/tests/Map_Manager_Test.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Map_Manager_Test.cpp -// -// = DESCRIPTION -// This is a simple test of the ACE_Map_Manager that -// illustrates how to use the forward and reverse iterators. -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/Map_Manager.h" -#include "ace/Synch.h" -#include "test_config.h" - -typedef ACE_Null_Mutex MUTEX; -typedef int KEY; -typedef int VALUE; - -typedef ACE_Map_Manager <KEY, VALUE, MUTEX> MAP_MANAGER; -typedef ACE_Map_Iterator <KEY, VALUE, MUTEX> ITERATOR; -typedef ACE_Map_Reverse_Iterator <KEY, VALUE, MUTEX> REVERSE_ITERATOR; -typedef ACE_Map_Entry <KEY, VALUE> ENTRY; - -int -main (int, char *[]) -{ - ACE_START_TEST ("Map_Manager_Test"); - - const int ITERATIONS = 5; - MAP_MANAGER map; - - for (VALUE i = 1; i <= ITERATIONS; i++) - { - if (map.bind (i, i) != 0) - ACE_ERROR_RETURN ((LM_ERROR, "MAP_MANAGER::bind"), -1); - } - - ACE_DEBUG ((LM_DEBUG, "\nForward Iterations\n")); - { - ITERATOR iterator (map); - for (ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - ACE_DEBUG ((LM_DEBUG, "%d %d\n", entry->ext_id_, entry->int_id_)); - } - } - - ACE_DEBUG ((LM_DEBUG, "\nReverse Iterations\n")); - { - REVERSE_ITERATOR iterator (map); - for (ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - ACE_DEBUG ((LM_DEBUG, "%d %d\n", entry->ext_id_, entry->int_id_)); - } - } - - ACE_DEBUG ((LM_DEBUG, "\nForward Iterations\n")); - { - MAP_MANAGER::ITERATOR iterator (map); - for (MAP_MANAGER::ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - ACE_DEBUG ((LM_DEBUG, "%d %d\n", entry->ext_id_, entry->int_id_)); - } - } - - ACE_DEBUG ((LM_DEBUG, "\nReverse Iterations\n")); - { - MAP_MANAGER::REVERSE_ITERATOR iterator (map); - for (MAP_MANAGER::ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - ACE_DEBUG ((LM_DEBUG, "%d %d\n", entry->ext_id_, entry->int_id_)); - } - } - - ACE_END_TEST; - return 0; -} |