summaryrefslogtreecommitdiff
path: root/ACE/tests/OS_Test.cpp
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-08 18:04:16 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-08 18:04:16 +0000
commitf2467c5915867c006aa16fd22e482816e029a2db (patch)
tree61d8fcb4aa8a71d9034ff510ee52b2b7ca13fb5c /ACE/tests/OS_Test.cpp
parenta2b8eda5d51dca5496c94600a7d3082b1a5f3601 (diff)
downloadATCD-ReDaC_01.tar.gz
made a copyReDaC_01
Diffstat (limited to 'ACE/tests/OS_Test.cpp')
-rw-r--r--ACE/tests/OS_Test.cpp79
1 files changed, 1 insertions, 78 deletions
diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp
index d270a19d66c..fa7b058e4e4 100644
--- a/ACE/tests/OS_Test.cpp
+++ b/ACE/tests/OS_Test.cpp
@@ -92,7 +92,7 @@ rename_test (void)
}
ACE_OS::fclose (f);
-#if defined (ACE_WIN32) && defined (ACE_LACKS_WIN32_MOVEFILEEX)
+#if defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 == 0
// Can't rename if new_file exists already.
ACE_OS::unlink (new_file);
#endif
@@ -524,78 +524,6 @@ string_emulation_test (void)
return 0;
}
-// Test ACE_OS::snprintf
-int
-snprintf_test (void)
-{
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing snprintf\n")));
-
- int error_count = 0;
- const int BUFFER_SIZE = 4;
- char buf[2*BUFFER_SIZE];
- int retval;
-
- ACE_OS::memset(buf, 0xab, 2*BUFFER_SIZE);
- retval = ACE_OS::snprintf (buf, BUFFER_SIZE, "%d", 123);
- if (retval != 3)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[1] ACE_OS::snprintf() returns %d, should be 3\n"),
- retval));
- ++error_count;
- }
-
- ACE_OS::memset(buf, 0xab, 2*BUFFER_SIZE);
- retval = ACE_OS::snprintf (buf, BUFFER_SIZE, "%d", 1234);
-
- // HP-UX has broken vsnprintf
-#if !defined (HPUX)
- if (retval != 4)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[2] ACE_OS::snprintf() returns %d, should be 4\n"),
- retval));
- ++error_count;
- }
-#endif /* !HPUX */
-
- if (buf[3] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[3] ACE_OS::snprintf() doesn't terminate string correctly\n")));
- ++error_count;
- }
- else if (ACE_OS::strcmp(buf, "123") != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[4] ACE_OS::snprintf() incorrect output\n")));
- ++error_count;
- }
-
- ACE_OS::memset(buf, 0xab, 2*BUFFER_SIZE);
- retval = ACE_OS::snprintf (buf, BUFFER_SIZE, "%d", 12345);
- if (retval != 5)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[5] ACE_OS::snprintf() returns %d, should be 5\n"),
- retval));
- ++error_count;
- }
- else if (buf[3] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[6] ACE_OS::snprintf() doesn't terminate string correctly\n")));
- ++error_count;
- }
- else if (ACE_OS::strcmp(buf, "123") != 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[6] ACE_OS::snprintf() incorrect output\n")));
- ++error_count;
- }
-
- return error_count;
-}
static int
ctime_r_test (void)
@@ -911,11 +839,6 @@ run_main (int, ACE_TCHAR *[])
if ((result = string_emulation_test ()) != 0)
status = result;
-#if !defined (ACE_LACKS_VSNPRINTF) || defined (ACE_HAS_TRIO)
- if ((result = snprintf_test ()) != 0)
- status = result;
-#endif /* !ACE_LACKS_VSNPRINTF || ACE_HAS_TRIO */
-
if ((result = ctime_r_test ()) != 0)
status = result;