summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-07 05:28:39 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-07 05:28:39 +0000
commit5f049a37e111872237fd6cec88c602c619259e66 (patch)
tree80febd0f4630d0f36572a66b69861b2bddc26f60 /tests
parentf675792ad48fd536b21e22599f1409a0bb502c54 (diff)
downloadATCD-5f049a37e111872237fd6cec88c602c619259e66.tar.gz
.
Diffstat (limited to 'tests')
-rw-r--r--tests/DLList_Test.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/tests/DLList_Test.cpp b/tests/DLList_Test.cpp
index c5a484e918f..217e23d74ee 100644
--- a/tests/DLList_Test.cpp
+++ b/tests/DLList_Test.cpp
@@ -70,23 +70,19 @@ run_test (void)
for (i = 0; string_table[i] != 0; i++)
{
- if (i % 2)
- {
- if (list.insert_tail (&string_table[i]) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p failed for %s \n"),
- ASYS_TEXT ("insert"),
- string_table[i]), -1);
- }
- else
- {
- if (list.insert_head (&string_table[i]) == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p failed for %s \n"),
- ASYS_TEXT ("insert"),
- string_table[i]), -1);
- }
-
+ if (ACE_EVEN (i)
+ && list.insert_tail ((STRING) &string_table[i]) == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p failed for %s \n"),
+ ASYS_TEXT ("insert"),
+ string_table[i]),
+ -1);
+ else if (list.insert_head ((STRING) &string_table[i]) == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("%p failed for %s \n"),
+ ASYS_TEXT ("insert"),
+ string_table[i]),
+ -1);
run_iterate (list);
}