summaryrefslogtreecommitdiff
path: root/ACE/tests/CDR_Test.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2006-12-11 20:23:51 +0000
committerSteve Huston <shuston@riverace.com>2006-12-11 20:23:51 +0000
commit128354217763fb3f6c76739718421099faa920e7 (patch)
tree1c1e265807dc85799a98e54a495a02a343ae0b87 /ACE/tests/CDR_Test.cpp
parent39db6c29c279fe07771e073e39378a4fed41875a (diff)
downloadATCD-128354217763fb3f6c76739718421099faa920e7.tar.gz
ChangeLogTag:Mon Dec 11 20:21:14 UTC 2006 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/tests/CDR_Test.cpp')
-rw-r--r--ACE/tests/CDR_Test.cpp39
1 files changed, 38 insertions, 1 deletions
diff --git a/ACE/tests/CDR_Test.cpp b/ACE/tests/CDR_Test.cpp
index ca61076c4ed..b4f2c206f72 100644
--- a/ACE/tests/CDR_Test.cpp
+++ b/ACE/tests/CDR_Test.cpp
@@ -560,7 +560,44 @@ run_main (int argc, ACE_TCHAR *argv[])
}
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Long stream[2] - no errors\n\n")));
+ ACE_TEXT ("Long stream[2] - no errors\n\n")
+ ACE_TEXT ("Testing consolidation\n\n")));
+
+ ACE_OutputCDR output (30);
+ CDR_Test_Types test_types;
+
+ if (test_types.test_put (output) != 0)
+ return 1;
+
+ if (output.begin () == output.end ())
+ ACE_DEBUG ((LM_WARNING,
+ ACE_TEXT ("Only one block needed; test no effective.\n")));
+ else
+ {
+ if (output.consolidate () != 0)
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("consolidate")));
+ }
+
+ ACE_InputCDR input (output);
+ if (debug > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Output CDR: \n")));
+ ACE_HEX_DUMP ((LM_DEBUG,
+ input.rd_ptr(),
+ 64));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Input CDR: \n")));
+ ACE_HEX_DUMP ((LM_DEBUG,
+ input.rd_ptr(),
+ 64));
+ }
+
+ if (test_types.test_get (input) != 0)
+ return 1;
+
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Consolidation - no errors\n\n")));
ACE_END_TEST;
return 0;