summaryrefslogtreecommitdiff
path: root/ACE/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-04-16 11:04:18 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-04-16 11:04:18 +0000
commit81329b8965c8ce5463cbc1f64a1365377a59c156 (patch)
tree78ef5af471ca7e71ad5937ea596583da05b0f8e1 /ACE/tests
parent526a898921e0ebd5651e94518f260bf6d7c28d28 (diff)
downloadATCD-81329b8965c8ce5463cbc1f64a1365377a59c156.tar.gz
Mon Apr 16 11:01:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/tests')
-rw-r--r--ACE/tests/Barrier_Test.cpp2
-rw-r--r--ACE/tests/Handle_Set_Test.cpp7
-rw-r--r--ACE/tests/Log_Msg_Test.cpp19
-rw-r--r--ACE/tests/Priority_Reactor_Test.cpp2
-rw-r--r--ACE/tests/Process_Strategy_Test.cpp6
-rw-r--r--ACE/tests/Test_Output.cpp4
6 files changed, 21 insertions, 19 deletions
diff --git a/ACE/tests/Barrier_Test.cpp b/ACE/tests/Barrier_Test.cpp
index 2af15dfb66d..9f0bf8ecdd8 100644
--- a/ACE/tests/Barrier_Test.cpp
+++ b/ACE/tests/Barrier_Test.cpp
@@ -34,7 +34,7 @@ struct Tester_Args
n_iterations_ (i) {}
ACE_Barrier &tester_barrier_;
- // Reference to the tester barrier. This controls each miteration
+ // Reference to the tester barrier. This controls each iteration
// of the tester function running in every thread.
int n_iterations_;
diff --git a/ACE/tests/Handle_Set_Test.cpp b/ACE/tests/Handle_Set_Test.cpp
index 17f83625f4b..529d269296b 100644
--- a/ACE/tests/Handle_Set_Test.cpp
+++ b/ACE/tests/Handle_Set_Test.cpp
@@ -109,16 +109,9 @@ test_boundaries (void)
(handle = i1 ()) != ACE_INVALID_HANDLE;
)
{
-#if defined (ACE_PSOS_DIAB)
- // Workaround for some compiler confusion with strings in
- // assertions.
- const int SET_IS_EMPTY_SO_SHOULD_NOT_SEE_THIS = 1;
- ACE_ASSERT (0 == SET_IS_EMPTY_SO_SHOULD_NOT_SEE_THIS);
-#else /* ! defined (ACE_PSOS_DIAB) */
ACE_ASSERT (0 ==
ACE_TEXT ("this shouldn't get called since ")
ACE_TEXT ("the set is empty!\n"));
-#endif /* defined (ACE_PSOS_DIAB) */
}
ACE_DEBUG ((LM_DEBUG,
diff --git a/ACE/tests/Log_Msg_Test.cpp b/ACE/tests/Log_Msg_Test.cpp
index 71645e2ca0b..bd7a7f1db1d 100644
--- a/ACE/tests/Log_Msg_Test.cpp
+++ b/ACE/tests/Log_Msg_Test.cpp
@@ -393,10 +393,10 @@ test_ostream (void)
ACE_FILE_Connector connector;
ACE_FILE_IO file;
+ ACE_FILE_Addr file_addr (filename);
// Open up the file.
- if (connector.connect (file,
- ACE_FILE_Addr (filename)) == -1)
+ if (connector.connect (file, file_addr) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("connect failed for %p\n"),
@@ -404,10 +404,16 @@ test_ostream (void)
1);
}
+#if !defined (VXWORKS) && !defined (ACE_HAS_PHARLAP)
+# define TEST_CAN_UNLINK_IN_ADVANCE
+#endif
+
+#if defined (TEST_CAN_UNLINK_IN_ADVANCE)
// Unlink this file right away so that it is automatically removed
// when the process exits.Ignore error returns in case this operation
// is not supported.
ACE_OS::unlink(filename);
+#endif
ACE_FILE_Info info;
if (file.get_info (info) == -1)
@@ -445,6 +451,15 @@ test_ostream (void)
ACE_TEXT ("%C"),
buffer));
+#if !defined (TEST_CAN_UNLINK_IN_ADVANCE)
+ file.close ();
+ if (file.unlink () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("unlink failed for %p\n"),
+ file_addr.get_path_name ()),
+ 1);
+#endif
+
#endif /* ACE_LACKS_IOSTREAM_TOTALLY */
// This message should show up in stderr and the ostream (without
diff --git a/ACE/tests/Priority_Reactor_Test.cpp b/ACE/tests/Priority_Reactor_Test.cpp
index e3547dd1509..9d581b2d44c 100644
--- a/ACE/tests/Priority_Reactor_Test.cpp
+++ b/ACE/tests/Priority_Reactor_Test.cpp
@@ -375,7 +375,7 @@ run_main (int argc, ACE_TCHAR *argv[])
#if defined (ACE_HAS_THREADS)
ACE_Thread_Manager::instance ()->wait ();
-#elif !defined (ACE_WIN32) && !defined (VXWORKS) && !defined (ACE_PSOS)
+#elif !defined (ACE_WIN32) && !defined (VXWORKS)
for (i = 0; i < opt_nchildren; ++i)
{
pid_t pid = ACE_OS::wait();
diff --git a/ACE/tests/Process_Strategy_Test.cpp b/ACE/tests/Process_Strategy_Test.cpp
index d97b052dbb3..f7d2d35bc00 100644
--- a/ACE/tests/Process_Strategy_Test.cpp
+++ b/ACE/tests/Process_Strategy_Test.cpp
@@ -250,13 +250,7 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
-1);
break;
#else
-# if defined (ACE_PSOS_DIAB)
- // Workaround for compiler confusion with strings in assertions.
- const int PROCESS_INVALID_ON_THIS_PLATFORM = 1;
- ACE_ASSERT (PROCESS_INVALID_ON_THIS_PLATFORM == 0);
-# else /* ! defined (ACE_PSOS_DIAB) */
ACE_ASSERT ("PROCESS invalid on this platform" == 0);
-# endif /* defined (ACE_PSOS_DIAB) */
#endif /* !defined (ACE_LACKS_FORK) */
case Options::THREAD:
#if defined (ACE_HAS_THREADS)
diff --git a/ACE/tests/Test_Output.cpp b/ACE/tests/Test_Output.cpp
index 20f9c6a30e3..55dd73f7887 100644
--- a/ACE/tests/Test_Output.cpp
+++ b/ACE/tests/Test_Output.cpp
@@ -47,9 +47,9 @@ ACE_Test_Output::ACE_Test_Output (void)
ACE_Test_Output::~ACE_Test_Output (void)
{
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) && !defined (ACE_PSOS)
+#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
ACE_LOG_MSG->msg_ostream (&cerr, 0);
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY && ! ACE_PSOS */
+#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM);
ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR);