summaryrefslogtreecommitdiff
path: root/ACE/tests/OrdMultiSet_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/OrdMultiSet_Test.cpp')
-rw-r--r--ACE/tests/OrdMultiSet_Test.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/ACE/tests/OrdMultiSet_Test.cpp b/ACE/tests/OrdMultiSet_Test.cpp
index a87869d7438..279fd8c5aef 100644
--- a/ACE/tests/OrdMultiSet_Test.cpp
+++ b/ACE/tests/OrdMultiSet_Test.cpp
@@ -53,89 +53,89 @@ run_main (int, ACE_TCHAR *[])
{
// No action.
}
-
+
while (set.remove (20) == 0)
{
// No action.
}
// Should still have 39 elements in the set.
- ACE_ASSERT (set.is_empty () == 0);
- ACE_ASSERT (set.size () == 39);
+ ACE_TEST_ASSERT (set.is_empty () == 0);
+ ACE_TEST_ASSERT (set.size () == 39);
// Iterate forward through the range we created: should be one of
// each.
iter.first ();
-
+
for (i = -19; i <= 19; ++i)
{
// we should still be in the set
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
// make sure the current element is what we expect
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == i);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == i);
// move to the next element in the set
iter.advance ();
}
// We should have iterated through the entire set.
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
// Iterate backward through the range we created: should be one of
// each.
iter.last ();
-
+
for (i = 19; i >= -19; --i)
{
// We should still be in the set.
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
// Make sure the current element is what we expect.
int *ptr = 0;
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == i);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == i);
// Move to the previous element in the set.
iter.retreat ();
}
// We should have iterated through the entire set.
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
// Iterate through the set and use the operator* to get the element
iter.first ();
-
+
for (i = -19; i <= 19; ++i)
{
// we should still be in the set
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
// make sure the current element is what we expect
int& l = *iter;
- ACE_ASSERT (l == i);
+ ACE_TEST_ASSERT (l == i);
// move to the next element in the set
iter.advance ();
}
// We should have iterated through the entire set.
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
// Clear the set, restart the iterator, and make sure the iterator
// is out of range at both ends, the set is empty, and a subsequent
// advance or retreat on an out of range iterator does not cause
// problems
set.reset ();
- ACE_ASSERT (set.is_empty () != 0);
+ ACE_TEST_ASSERT (set.is_empty () != 0);
iter.first ();
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
iter.retreat ();
iter.last ();
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
iter.advance ();
// Put in a bunch of ints in various relative positions, using an
@@ -163,12 +163,12 @@ run_main (int, ACE_TCHAR *[])
{
// No action.
}
-
+
while (set.remove (202) == 0)
{
// No action.
}
-
+
while (set.remove (203) == 0)
{
// No action.
@@ -179,67 +179,67 @@ run_main (int, ACE_TCHAR *[])
iter.last ();
iter.advance ();
set.find (203, iter);
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
set.find (202, iter);
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
set.find (204, iter);
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
// Make sure the other elements can be found.
set.find (205, iter);
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == 205);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == 205);
set.find (201, iter);
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == 201);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == 201);
// Finally, iterate through the set and make sure its contents are
// correct (one 201 and five 205s).
iter.first ();
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == 201);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == 201);
iter.advance ();
for (i = 1; i <= 5; ++i)
{
// Should be in the set, able to access the element, value
// should be 205
- ACE_ASSERT (iter.done () == 0);
+ ACE_TEST_ASSERT (iter.done () == 0);
iter.next (ptr);
- ACE_ASSERT (ptr != 0);
- ACE_ASSERT (*ptr == 205);
+ ACE_TEST_ASSERT (ptr != 0);
+ ACE_TEST_ASSERT (*ptr == 205);
// Move to the next element in the set.
iter.advance ();
}
// Should not be anything else in the set.
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
// remove the rest
while (set.remove (205) == 0)
{
// No action.
}
-
+
while (set.remove (201) == 0)
{
// No action.
}
// Should have no more elements in the set.
- ACE_ASSERT (set.is_empty () != 0);
- ACE_ASSERT (set.size () == 0);
+ ACE_TEST_ASSERT (set.is_empty () != 0);
+ ACE_TEST_ASSERT (set.size () == 0);
iter.first ();
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
iter.last ();
- ACE_ASSERT (iter.done () != 0);
+ ACE_TEST_ASSERT (iter.done () != 0);
ACE_END_TEST;