summaryrefslogtreecommitdiff
path: root/ACE/tests/CDR_File_Test.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-11-06 19:26:36 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-11-06 19:26:36 +0000
commitd5f1e713962094f3017eea2c7cde93b011992e6b (patch)
tree24494c0a5d940aaeba1efaabd978db5c7b7e4b8b /ACE/tests/CDR_File_Test.cpp
parentc64d1fd4a5f64e1cae6b13d09d64f70da74b5e84 (diff)
downloadATCD-d5f1e713962094f3017eea2c7cde93b011992e6b.tar.gz
Thu Nov 6 19:26:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/tests/CDR_File_Test.cpp')
-rw-r--r--ACE/tests/CDR_File_Test.cpp38
1 files changed, 2 insertions, 36 deletions
diff --git a/ACE/tests/CDR_File_Test.cpp b/ACE/tests/CDR_File_Test.cpp
index ee987e9dd68..95352fc903d 100644
--- a/ACE/tests/CDR_File_Test.cpp
+++ b/ACE/tests/CDR_File_Test.cpp
@@ -34,11 +34,7 @@
ACE_RCSID(tests, CDR_File_Test, "$Id$")
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) || defined (ACE_HAS_WINCE)
-
-#if defined (ACE_HAS_WINCE)
-#include "CE_fostream.h"
-#endif // ACE_HAS_WINCE
+#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
class CDR_Test
{
@@ -224,14 +220,7 @@ run_test (int write_file,
output_cdr << cdr_test;
// Output the data to cout.
-#if defined (ACE_HAS_WINCE) && defined (ACE_LACKS_IOSTREAM_TOTALLY)
- // Since CE does not have ostream, ace_file_stream and output_file() cannot
- // be used. Just use 'hard-coded' file name here.
- (*ACE_CE_OSTREAM::instance()).open(ACE_TEXT("\\Log\\CDR_File_Test.txt"));
- (*ACE_CE_OSTREAM::instance()) << cdr_test;
-#else
*ace_file_stream::instance ()->output_file () << cdr_test;
-#endif // ACE_HAS_WINCE
// Save the data.
const ACE_Message_Block *output_mb =
@@ -323,11 +312,7 @@ run_test (int write_file,
// <CDR_Test> object.
input_cdr >> temp;
-#if defined (ACE_HAS_WINCE) && defined (ACE_LACKS_IOSTREAM_TOTALLY)
- (*ACE_CE_OSTREAM::instance()) << temp;
-#else
*ace_file_stream::instance ()->output_file () << temp;
-#endif // ACE_HAS_WINCE
if (!(temp == cdr_test))
ACE_ERROR ((LM_ERROR, ACE_TEXT ("Data mismatch across file\n")));
@@ -404,30 +389,13 @@ run_main (int argc, ACE_TCHAR *argv[])
0,
ACE_Addr::sap_any,
0,
- ((writing) ? (O_RDWR | O_CREAT) : O_RDONLY),
+ ((writing) ? (O_RDWR | O_CREAT) : O_RDONLY),
ACE_DEFAULT_FILE_PERMS) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("connect failed for %p\n"),
filename.get_path_name ()),
1);
-#if !defined (ACE_VXWORKS) && !defined (ACE_HAS_PHARLAP) || (defined(ACE_VXWORKS) && (ACE_VXWORKS > 0x660))
-# define TEST_CAN_UNLINK_IN_ADVANCE
-#endif
-
-#if defined (TEST_CAN_UNLINK_IN_ADVANCE)
- if (fn == 0)
- {
- // Unlink this file right away so that it is automatically removed
- // when the process exits.
- if (file.unlink () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("pre-unlink failed for %p\n"),
- filename.get_path_name ()),
- 1);
- }
-#endif
-
CDR_Test cdr_test ('a',
0x00ff,
0xaabbccdd,
@@ -453,7 +421,6 @@ run_main (int argc, ACE_TCHAR *argv[])
cdr_test);
}
-#if !defined (TEST_CAN_UNLINK_IN_ADVANCE)
if (fn == 0)
{
file.close ();
@@ -463,7 +430,6 @@ run_main (int argc, ACE_TCHAR *argv[])
filename.get_path_name ()),
1);
}
-#endif
ACE_END_TEST;
return 0;