summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-12 08:03:36 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-12-12 08:03:36 +0000
commitcb40666f255f983d24bc99d602de544da3f9cf07 (patch)
treeef850caa3e4b4b4d5555a8ff50d45eea0deed4c3 /tests
parent4adc30d5e9acd884d6f796c0a6e10efd11173a04 (diff)
downloadATCD-cb40666f255f983d24bc99d602de544da3f9cf07.tar.gz
foo
Diffstat (limited to 'tests')
-rw-r--r--tests/Buffer_Stream_Test.cpp3
-rw-r--r--tests/TSS_Test.cpp38
-rw-r--r--tests/TSS_Test_Errno.h46
-rw-r--r--tests/run_tests.bat2
4 files changed, 49 insertions, 40 deletions
diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp
index bce8c31b266..a228d94e783 100644
--- a/tests/Buffer_Stream_Test.cpp
+++ b/tests/Buffer_Stream_Test.cpp
@@ -227,6 +227,3 @@ main (int, char *[])
ACE_END_TEST;
return 0;
}
-
-
-
diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp
index 0642f84e2ba..724f1c322b0 100644
--- a/tests/TSS_Test.cpp
+++ b/tests/TSS_Test.cpp
@@ -22,6 +22,7 @@
#include "ace/Service_Config.h"
#include "ace/Synch.h"
+#include "TSS_Test_Errno.h"
#include "test_config.h"
#if defined (ACE_HAS_THREADS)
@@ -29,43 +30,6 @@
static const int ITERATIONS = 100;
-class Errno
-{
-public:
- int error (void) { return this->errno_; }
- void error (int i) { this->errno_ = i; }
-
- int line (void) { return this->lineno_; }
- void line (int l) { this->lineno_ = l; }
-
- // Errno::flags_ is a static variable, so we've got to protect it
- // with a mutex since it isn't kept in thread-specific storage.
- int flags (void) {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1));
-
- return Errno::flags_;
- }
- int flags (int f)
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1));
-
- Errno::flags_ = f;
- return 0;
- }
-
-private:
- // = errno_ and lineno_ will be thread-specific data so they don't
- // need a lock.
- int errno_;
- int lineno_;
-
- static int flags_;
-#if defined (ACE_HAS_THREADS)
- // flags_ needs a lock.
- static ACE_Thread_Mutex lock_;
-#endif /* ACE_HAS_THREADS */
-};
-
// Static variables.
ACE_MT (ACE_Thread_Mutex Errno::lock_);
int Errno::flags_;
diff --git a/tests/TSS_Test_Errno.h b/tests/TSS_Test_Errno.h
new file mode 100644
index 00000000000..09aeec79f4d
--- /dev/null
+++ b/tests/TSS_Test_Errno.h
@@ -0,0 +1,46 @@
+class Errno
+// ============================================================================
+// = TITLE
+// Define a simple Errno abstraction
+//
+// = DESCRIPTION
+// This class gets its own header file to work around AIX C++
+// compiler "features" related to template instantiation... It is
+// only used by TSS_Test.cpp
+// ============================================================================
+{
+public:
+ int error (void) { return this->errno_; }
+ void error (int i) { this->errno_ = i; }
+
+ int line (void) { return this->lineno_; }
+ void line (int l) { this->lineno_ = l; }
+
+ // Errno::flags_ is a static variable, so we've got to protect it
+ // with a mutex since it isn't kept in thread-specific storage.
+ int flags (void) {
+ ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1));
+
+ return Errno::flags_;
+ }
+ int flags (int f)
+ {
+ ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1));
+
+ Errno::flags_ = f;
+ return 0;
+ }
+
+private:
+ // = errno_ and lineno_ will be thread-specific data so they don't
+ // need a lock.
+ int errno_;
+ int lineno_;
+
+ static int flags_;
+#if defined (ACE_HAS_THREADS)
+ // flags_ needs a lock.
+ static ACE_Thread_Mutex lock_;
+#endif /* ACE_HAS_THREADS */
+};
+
diff --git a/tests/run_tests.bat b/tests/run_tests.bat
index 3419d714c00..b8fe7f03160 100644
--- a/tests/run_tests.bat
+++ b/tests/run_tests.bat
@@ -12,6 +12,7 @@ Map_Manager_Test
Mem_Map_Test
Message_Queue_Test
MM_Shared_Memory_Test
+@echo The following test runs for about 1 minute
Mutex_Test
Naming_Test
Pipe_Test
@@ -21,6 +22,7 @@ Reactor_Timer_Test
Reactors_Test
Reader_Writer_Test
Recursive_Mutex_Test
+Service_Config_Test
SPIPE_Test
SString_Test
SV_Shared_Memory_Test