summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-08-01 12:42:14 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-08-01 12:42:14 +0000
commitf1b8f42c382f3fc8939d9c9924f6e3fadb6020bf (patch)
tree2cf23212457f35cb8e682464b498a64510a11aab
parentfefc32997e6fd73caf0302ee794043ff943bde44 (diff)
downloadATCD-f1b8f42c382f3fc8939d9c9924f6e3fadb6020bf.tar.gz
ChangeLogTag:Sat Aug 1 12:19:58 UTC 2009 Carlos O'Ryan <coryan@glamdring>
-rw-r--r--ACE/ChangeLog89
-rw-r--r--ACE/tests/Compiler_Features_01_Test.cpp65
-rw-r--r--ACE/tests/Compiler_Features_02_Test.cpp83
-rw-r--r--ACE/tests/Compiler_Features_03_Test.cpp65
-rw-r--r--ACE/tests/Compiler_Features_04_Test.cpp83
-rw-r--r--ACE/tests/Compiler_Features_05_Test.cpp68
-rw-r--r--ACE/tests/Compiler_Features_06_Test.cpp91
-rw-r--r--ACE/tests/Compiler_Features_07_Test.cpp83
-rw-r--r--ACE/tests/Compiler_Features_08_Test.cpp83
-rw-r--r--ACE/tests/Compiler_Features_09_Test.cpp108
-rw-r--r--ACE/tests/Compiler_Features_10_Test.cpp287
-rw-r--r--ACE/tests/Compiler_Features_11_Test.cpp66
-rw-r--r--ACE/tests/Compiler_Features_12_Test.cpp59
-rw-r--r--ACE/tests/Compiler_Features_13_Test.cpp145
-rw-r--r--ACE/tests/Compiler_Features_14_Test.cpp114
-rw-r--r--ACE/tests/Makefile.am280
-rw-r--r--ACE/tests/run_test.lst13
-rw-r--r--ACE/tests/tests.mpc98
18 files changed, 1880 insertions, 0 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index b5f71f306f8..5e4e0f11e28 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,92 @@
+Sat Aug 1 12:19:58 UTC 2009 Carlos O'Ryan <coryan@glamdring>
+
+ * This completes the fixes for Buzilla #3715:
+
+ * tests/run_test.lst:
+ * tests/Makefile.am:
+ * tests/tests.mpc:
+ * tests/Compiler_Features_14_Test.cpp:
+ This test verifies that partial template specialization works.
+
+ * tests/Compiler_Features_11_Test.cpp:
+ Test for standard string streams
+
+ * tests/Compiler_Features_12_Test.cpp:
+ Test for template template parameters
+
+ * tests/Compiler_Features_13_Test.cpp:
+ Test for cast operators
+
+ * tests/tests.mpc:
+ * tests/run_test.lst:
+ * tests/Makefile.am:
+ The usual accruements that go with the tests.
+
+ * tests/run_test.lst:
+ * tests/Makefile.am:
+ * tests/tests.mpc:
+ * tests/Compiler_Features_10_Test.cpp:
+ Add new test for exceptions. Verify that <stdexcept> is there,
+ that we can raise exceptions, and that object destruction during
+ exceptions is sound.
+
+ * tests/Compiler_Features_07_Test.cpp:
+ Test for std::string
+
+ * tests/Compiler_Features_08_Test.cpp:
+ Test for std::wstring
+
+ * tests/Compiler_Features_09_Test.cpp:
+ Test for std::auto_ptr<>
+
+ * tests/Compiler_Features_06_Test.cpp:
+ Fixed typo in test name.
+
+ * tests/run_test.lst:
+ * tests/Makefile.am:
+ * tests/tests.mpc:
+ Add the compilation / run paraphernalia.
+
+ * tests/Compiler_Features_04_Test.cpp:
+ Test for std::set<>
+
+ * tests/Compiler_Features_05_Test.cpp:
+ Test for std::queue<>, this is a different sort of test because
+ std::queue<> is an adaptor, not a collection. The default
+ collection is a std::deque<>, so we are testing default template
+ parameters at the same time.
+
+ * tests/Compiler_Features_06_Test.cpp:
+ Test for std::set<> with a different order function.
+
+ * tests/run_test.lst:
+ * tests/Makefile.am:
+ * tests/tests.mpc:
+ Add the compilation / run paraphernalia.
+
+ * tests/Makefile.am:
+ * tests/tests.mpc:
+ * tests/Compiler_Features_03_Test.cpp:
+ This time it is std::vector<>
+
+ * tests/run_test.lst:
+ I need to remember to add the tests to the list of automatically
+ executed ones.
+
+ * tests/tests.mpc:
+ * tests/Makefile.am:
+ * tests/Compiler_Features_02_Test.cpp:
+ Test if the std::map<> class works.
+
+ * tests/Compiler_Features_01_Test.cpp:
+ Make the tests more consistent by using typedefs.
+
+ * tests/tests.mpc:
+ * tests/Makefile.am:
+ * tests/Compiler_Features_01_Test.cpp:
+ Add first test for "modern" C++ compiler features. In this
+ case, I test if the std::list<> class works.
+
Thu Jul 30 12:53:20 UTC 2009 James H. Hill <hillj@dre.vanderbilt.edu>
* ace/String_Base.h:
diff --git a/ACE/tests/Compiler_Features_01_Test.cpp b/ACE/tests/Compiler_Features_01_Test.cpp
new file mode 100644
index 00000000000..4ba1a249557
--- /dev/null
+++ b/ACE/tests/Compiler_Features_01_Test.cpp
@@ -0,0 +1,65 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::list container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <list>
+
+ACE_RCSID(tests, Compiler_Features_01_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_01_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::list<int> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.push_back(5);
+ c.push_back(4);
+ c.push_back(3);
+ c.push_back(2);
+ c.push_back(1);
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ for(collection::iterator i = c.begin(), end = c.end();
+ i != end;
+ ++i)
+ {
+ sum += *i;
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_02_Test.cpp b/ACE/tests/Compiler_Features_02_Test.cpp
new file mode 100644
index 00000000000..91a02a8206a
--- /dev/null
+++ b/ACE/tests/Compiler_Features_02_Test.cpp
@@ -0,0 +1,83 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::map container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <map>
+
+ACE_RCSID(tests, Compiler_Features_02_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_02_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::map<int,int> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c[1] = 5;
+ c[2] = 4;
+ c[3] = 3;
+ c[4] = 2;
+ c.insert(collection::value_type(5, 1));
+
+ // ... inserting twice returns a pair ...
+ std::pair<collection::iterator,bool> r =
+ c.insert(collection::value_type(5, 0));
+
+ // ... the iterator points to the element ...
+ if (r.first->first != 5 || r.first->second != 1)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected to find (5,1) already in map")));
+ }
+
+ // ... and the booleans says that it is already in the map ...
+ if (r.second == true)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected duplicate insert to fail")));
+ }
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ for(collection::iterator i = c.begin(), end = c.end();
+ i != end;
+ ++i)
+ {
+ sum += i->second;
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_03_Test.cpp b/ACE/tests/Compiler_Features_03_Test.cpp
new file mode 100644
index 00000000000..d932f864ba3
--- /dev/null
+++ b/ACE/tests/Compiler_Features_03_Test.cpp
@@ -0,0 +1,65 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::vector container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <vector>
+
+ACE_RCSID(tests, Compiler_Features_03_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_03_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::vector<int> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.push_back(5);
+ c.push_back(4);
+ c.push_back(3);
+ c.push_back(2);
+ c.push_back(1);
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ for(collection::iterator i = c.begin(), end = c.end();
+ i != end;
+ ++i)
+ {
+ sum += *i;
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_04_Test.cpp b/ACE/tests/Compiler_Features_04_Test.cpp
new file mode 100644
index 00000000000..c500f50f24c
--- /dev/null
+++ b/ACE/tests/Compiler_Features_04_Test.cpp
@@ -0,0 +1,83 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::set container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <set>
+
+ACE_RCSID(tests, Compiler_Features_04_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_04_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::set<int> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.insert(5);
+ c.insert(4);
+ c.insert(3);
+ c.insert(2);
+ c.insert(1);
+
+ // ... inserting twice returns a pair ...
+ std::pair<collection::iterator,bool> r =
+ c.insert(collection::value_type(5));
+
+ // ... the iterator points to the element ...
+ if (*r.first != 5)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected to find 5 already in set")));
+ }
+
+ // ... and the booleans says that it is already in the set ...
+ if (r.second == true)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected duplicate insert to fail")));
+ }
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ for(collection::iterator i = c.begin(), end = c.end();
+ i != end;
+ ++i)
+ {
+ sum += *i;
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_05_Test.cpp b/ACE/tests/Compiler_Features_05_Test.cpp
new file mode 100644
index 00000000000..386d9a4a4d6
--- /dev/null
+++ b/ACE/tests/Compiler_Features_05_Test.cpp
@@ -0,0 +1,68 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::queue container. The motivation for this test was a discussion
+ * on the development mailing queue, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <queue>
+
+ACE_RCSID(tests, Compiler_Features_05_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_05_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple queue ...
+ typedef std::queue<int> collection;
+ // ... if the previous line compiles, the default template
+ // parameters work. The declaration of queue<> is something like:
+ // template<typename T, typename Sequence = deque<T> >
+ // notice that this is not a template template parameter...
+ collection c;
+
+ // ... insert some elements ...
+ c.push(5);
+ c.push(4);
+ c.push(3);
+ c.push(2);
+ c.push(1);
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ while (! c.empty())
+ {
+ sum += c.front();
+ c.pop();
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_06_Test.cpp b/ACE/tests/Compiler_Features_06_Test.cpp
new file mode 100644
index 00000000000..7a4c6baf60b
--- /dev/null
+++ b/ACE/tests/Compiler_Features_06_Test.cpp
@@ -0,0 +1,91 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports alternative
+ * sorting functions in the std::set container. The motivation for
+ * this test was a discussion on the development mailing list, and the
+ * documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <set>
+
+ACE_RCSID(tests, Compiler_Features_06_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_06_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::set<int,std::greater<int> > collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.insert(5);
+ c.insert(4);
+ c.insert(3);
+ c.insert(2);
+ c.insert(1);
+
+ // ... inserting twice returns a pair ...
+ std::pair<collection::iterator,bool> r =
+ c.insert(collection::value_type(5));
+
+ // ... the iterator points to the element ...
+ if (*r.first != 5)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected to find 5 already in set")));
+ }
+
+ // ... and the booleans says that it is already in the set ...
+ if (r.second == true)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected duplicate insert to fail")));
+ }
+
+ // ... make sure the first element is the biggest one ...
+ if (5 != *c.begin())
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected largest element (5) at the front")));
+ }
+
+ // ... add all the numbers to validate that they are there ...
+ int sum = 0;
+ for(collection::iterator i = c.begin(), end = c.end();
+ i != end;
+ ++i)
+ {
+ sum += *i;
+ }
+
+ // ... remember Euler ...
+ int const expected = 5*(5+1)/2;
+ if (sum != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ expected, sum));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_07_Test.cpp b/ACE/tests/Compiler_Features_07_Test.cpp
new file mode 100644
index 00000000000..332f1e0894f
--- /dev/null
+++ b/ACE/tests/Compiler_Features_07_Test.cpp
@@ -0,0 +1,83 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::set container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <set>
+#include <string>
+
+ACE_RCSID(tests, Compiler_Features_07_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_07_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::set<std::string> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.insert("5");
+ c.insert("4");
+ c.insert("3");
+ c.insert("2");
+ c.insert(std::string("1"));
+
+ // ... inserting twice returns a pair ...
+ std::pair<collection::iterator,bool> r =
+ c.insert(collection::value_type("5"));
+
+ // ... the iterator points to the element ...
+ if (*r.first != std::string("5"))
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected to find 5 already in set")));
+ }
+
+ // ... and the booleans says that it is already in the set ...
+ if (r.second == true)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected duplicate insert to fail")));
+ }
+
+ // ... find an element and erase it ...
+ collection::iterator i;
+
+ i = c.find(std::string("4"));
+ if (i == c.end())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR, ACE_TEXT("Element not found")));
+ }
+ else
+ {
+ // ... this demonstrates a standard STL technique, you can
+ // optimize lookups by using the iterators returned in search
+ // functions ...
+ c.erase(i);
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_08_Test.cpp b/ACE/tests/Compiler_Features_08_Test.cpp
new file mode 100644
index 00000000000..1842111d66f
--- /dev/null
+++ b/ACE/tests/Compiler_Features_08_Test.cpp
@@ -0,0 +1,83 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::set container. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <set>
+#include <string>
+
+ACE_RCSID(tests, Compiler_Features_08_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_08_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Create a simple list ...
+ typedef std::set<std::wstring> collection;
+ collection c;
+
+ // ... insert some elements ...
+ c.insert(L"5");
+ c.insert(L"4");
+ c.insert(L"3");
+ c.insert(L"2");
+ c.insert(std::wstring(L"1"));
+
+ // ... inserting twice returns a pair ...
+ std::pair<collection::iterator,bool> r =
+ c.insert(collection::value_type(L"5"));
+
+ // ... the iterator points to the element ...
+ if (*r.first != std::wstring(L"5"))
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected to find 5 already in set")));
+ }
+
+ // ... and the booleans says that it is already in the set ...
+ if (r.second == true)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected duplicate insert to fail")));
+ }
+
+ // ... find an element and erase it ...
+ collection::iterator i;
+
+ i = c.find(std::wstring(L"4"));
+ if (i == c.end())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR, ACE_TEXT("Element not found")));
+ }
+ else
+ {
+ // ... this demonstrates a standard STL technique, you can
+ // optimize lookups by using the iterators returned in search
+ // functions ...
+ c.erase(i);
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_09_Test.cpp b/ACE/tests/Compiler_Features_09_Test.cpp
new file mode 100644
index 00000000000..ce32feb36fc
--- /dev/null
+++ b/ACE/tests/Compiler_Features_09_Test.cpp
@@ -0,0 +1,108 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * std::auto_ptr<> correctly. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <memory>
+
+// For extra challenge, we use the anonymous namespace
+namespace
+{
+/**
+ * @class Base
+ */
+class Base
+{
+public:
+ Base()
+ {
+ constructors++;
+ }
+ Base(Base const & )
+ {
+ constructors++;
+ }
+ ~Base()
+ {
+ destructors++;
+ }
+
+ static int constructors;
+ static int destructors;
+};
+
+int Base::constructors = 0;
+int Base::destructors = 0;
+
+class Derived : public Base
+{
+public:
+ Derived()
+ : Base()
+ {}
+};
+}
+
+ACE_RCSID(tests, Compiler_Features_09_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_09_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // ... this works with the ACE version of auto_ptr (well, the
+ // namespace is broken, but you get the idea) ...
+ std::auto_ptr<Base> x(new Base);
+ std::auto_ptr<Derived> y(new Derived);
+
+ // ... this does *not* work ...
+ x = y;
+
+ // ... there should be just one destruction so far ...
+ if (Base::destructors != 1)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("Destructor count off, expected 1, found %d\n"),
+ Base::destructors));
+ }
+
+ std::auto_ptr<Base> z;
+ z = x;
+ if (Base::destructors != 1)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("Destructor count off, expected 1, found %d\n"),
+ Base::destructors));
+ }
+ if (x.get())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("x contents should have been transferred\n")
+ ));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_10_Test.cpp b/ACE/tests/Compiler_Features_10_Test.cpp
new file mode 100644
index 00000000000..b18ef901005
--- /dev/null
+++ b/ACE/tests/Compiler_Features_10_Test.cpp
@@ -0,0 +1,287 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports exceptions,
+ * in particular, if raising exceptions in constructors work. The
+ * motivation for this test was a discussion on the development
+ * mailing list, and the documentation was captured in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <memory>
+
+// ... using exceptions with C++ also implies using the standard
+// exceptions ...
+#include <stdexcept>
+
+// For extra challenge, we use the anonymous namespace
+namespace
+{
+ int constructors = 0;
+ int destructors = 0;
+ int allocs = 0;
+ int deallocs = 0;
+ bool had_failure = false;
+
+ void check_constructor_count(int expected,
+ char const * filename,
+ int lineno);
+ void check_destructor_count(int expected,
+ char const * filename,
+ int lineno);
+ void check_alloc_count(int expected,
+ char const * filename,
+ int lineno);
+ void reset_counts();
+ void never_reached(char const * filename,
+ int lineno);
+ int status();
+
+ /**
+ * @class Base
+ */
+ class Base
+ {
+ public:
+ Base()
+ {
+ ++constructors;
+ }
+ Base(Base const & )
+ {
+ ++constructors;
+ }
+ ~Base()
+ {
+ ++destructors;
+ }
+
+ void * operator new(size_t n)
+ {
+ ++allocs;
+ return ::operator new(n);
+ }
+ void operator delete(void * x)
+ {
+ ++deallocs;
+ return ::operator delete(x);
+ }
+ };
+
+ /**
+ * @class May_Pop
+ *
+ * Create a class that can raise exceptions in its constructor
+ *
+ */
+ class May_Pop : public Base
+ {
+ public:
+ explicit May_Pop(bool do_raise)
+ // Even if an exception is raised, the base object is fully
+ // constructed and must be fully destructed ...
+ : Base()
+ {
+ if (do_raise)
+ {
+ throw std::runtime_error("requested exception");
+ }
+ // ... if an exception is raised this object is never
+ // initialized and no constructor / destructor calls should take
+ // place ...
+ Base tmp;
+ }
+ };
+
+ /**
+ * @class Aggregate
+ */
+ class Aggregate : public Base
+ {
+ private:
+ May_Pop m1;
+ May_Pop m2;
+ May_Pop m3;
+
+ public:
+ /**
+ * Constructor. Element m1 is fully initialized, its constructors
+ * and destructors should run, m2 is partially initialized, its
+ * destructor never runs, m3 is never initialized, neither its
+ * constructor nor destructor runs.
+ */
+ Aggregate()
+ : Base()
+ , m1(false)
+ , m2(true)
+ , m3(false)
+ {}
+ };
+}
+
+ACE_RCSID(tests, Compiler_Features_10_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_10_Test"));
+
+ {
+ // ... start the test fresh ...
+ reset_counts();
+ // Let's try to build a simple object and destroy it, without any
+ // exceptions raised ...
+ May_Pop m1(false);
+ // ... two instances of the base class should be created ...
+ check_constructor_count(2, __FILE__, __LINE__);
+ // ... but only one instance is destroyed at this point ...
+ check_destructor_count(1, __FILE__, __LINE__);
+ }
+ // ... now both instances are gone ...
+ check_destructor_count(2, __FILE__, __LINE__);
+
+ try
+ {
+ // ... start the test fresh ...
+ reset_counts();
+ // ... now raise an exception ...
+ May_Pop m1(true);
+ never_reached(__FILE__, __LINE__);
+ }
+ catch(...)
+ {
+ // ... only one instance gets created ...
+ check_constructor_count(1, __FILE__, __LINE__);
+ // ... and it is gone ...
+ check_destructor_count(1, __FILE__, __LINE__);
+ }
+
+ try
+ {
+ // ... start the test fresh ...
+ reset_counts();
+ // ... now build a complex object with a failure in the middle ...
+ Aggregate a;
+ never_reached(__FILE__, __LINE__);
+ }
+ catch(...)
+ {
+ // ... check the expectations ...
+ check_constructor_count(4, __FILE__, __LINE__);
+ check_destructor_count(4, __FILE__, __LINE__);
+ }
+
+ try
+ {
+ // ... start the test fresh ...
+ reset_counts();
+ std::auto_ptr<Aggregate> b(new Aggregate);
+ never_reached(__FILE__, __LINE__);
+ }
+ catch(...)
+ {
+ // ... check the expectations ...
+ check_constructor_count(4, __FILE__, __LINE__);
+ check_destructor_count(4, __FILE__, __LINE__);
+ check_alloc_count(1, __FILE__, __LINE__);
+ }
+
+ ACE_END_TEST;
+ return status();
+}
+
+namespace
+{
+
+void
+check_constructor_count(int expected,
+ char const * filename,
+ int lineno)
+{
+ if (constructors == expected)
+ {
+ return;
+ }
+ had_failure = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("Expected %d constructor calls, had %d -- (%s:%d)\n"),
+ expected, constructors, filename, lineno));
+}
+
+void
+check_destructor_count(int expected,
+ char const * filename,
+ int lineno)
+{
+ if (destructors == expected)
+ {
+ return;
+ }
+ had_failure = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("Expected %d destructor calls, had %d -- (%s:%d)\n"),
+ expected, destructors, filename, lineno));
+}
+
+void
+check_alloc_count(int expected,
+ char const * filename,
+ int lineno)
+{
+ if (allocs == expected && deallocs == expected)
+ {
+ return;
+ }
+ had_failure = true;
+ if (allocs != expected)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("Expected %d alloc calls, had %d -- (%s:%d)\n"),
+ expected, allocs, filename, lineno));
+ }
+ if (deallocs != expected)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("Expected %d dealloc calls, had %d -- (%s:%d)\n"),
+ expected, deallocs, filename, lineno));
+ }
+}
+
+void
+never_reached(char const * filename,
+ int lineno)
+{
+ had_failure = true;
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("Code should not have reached (%s:%d)\n"),
+ filename, lineno));
+}
+
+void
+reset_counts()
+{
+ constructors = 0;
+ destructors = 0;
+ allocs = 0;
+ deallocs = 0;
+}
+
+int
+status()
+{
+ if (had_failure)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+}
diff --git a/ACE/tests/Compiler_Features_11_Test.cpp b/ACE/tests/Compiler_Features_11_Test.cpp
new file mode 100644
index 00000000000..da5875c1a7b
--- /dev/null
+++ b/ACE/tests/Compiler_Features_11_Test.cpp
@@ -0,0 +1,66 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * string steams. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+// The first part of the test is to compile this line. If the program
+// does not compile the platform is just too broken.
+#include <sstream>
+
+ACE_RCSID(tests, Compiler_Features_11_Test, "$Id$")
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_11_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ // Test creation of a output stream ...
+ std::ostringstream os;
+
+ // ... add some strings and numbers to it ...
+ os << "1" << 2 << 3 << "45";
+
+ // ... verify the right thing comes out ...
+ std::string const expected("12345");
+ if (os.str() != expected)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %s got %s\n"),
+ expected.c_str(), os.str().c_str()));
+ }
+
+ // ... create an input stream from the result ...
+ std::istringstream is(os.str());
+
+ // ... extract as a number ...
+ int v;
+ is >> v;
+
+ // ... verify the right thing comes out ...
+ if (v != 12345)
+ {
+ status = 1;
+ ACE_ERROR ((LM_ERROR, ACE_TEXT("Expected %d got %d\n"),
+ 12345, v));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_12_Test.cpp b/ACE/tests/Compiler_Features_12_Test.cpp
new file mode 100644
index 00000000000..ffe095d6010
--- /dev/null
+++ b/ACE/tests/Compiler_Features_12_Test.cpp
@@ -0,0 +1,59 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports template
+ * template parameters. The motivation for this test was a discussion
+ * on the development mailing list, and the documentation was captured
+ * in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+ACE_RCSID(tests, Compiler_Features_12_Test, "$Id$")
+
+template<typename T>
+struct pair
+{
+ T x1;
+ T x2;
+};
+
+template<typename T>
+struct triple
+{
+ T t1;
+ T t2;
+ T t3;
+};
+
+template<typename T, template <typename> class Tuple>
+struct Array
+{
+ Tuple<T> array[5];
+};
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_12_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ Array<int, pair> pairs;
+ pairs.array[0].x1 = 0;
+
+ Array<int, triple> triples;
+ triples.array[1].t3 = 0;
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Compiler_Features_13_Test.cpp b/ACE/tests/Compiler_Features_13_Test.cpp
new file mode 100644
index 00000000000..f9f4317cbfc
--- /dev/null
+++ b/ACE/tests/Compiler_Features_13_Test.cpp
@@ -0,0 +1,145 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports the
+ * standard cast operators template parameters. The motivation for
+ * this test was a discussion on the development mailing list, and the
+ * documentation was captured in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+#include <stdexcept>
+
+ACE_RCSID(tests, Compiler_Features_13_Test, "$Id$")
+
+namespace
+{
+ /**
+ * Helper class for test
+ */
+ struct Base
+ {
+ virtual ~Base()
+ {}
+ };
+
+ /**
+ * Helper class for test
+ */
+ struct Derived : public Base
+ {
+ int value;
+ };
+
+ /**
+ * Helper class for test
+ */
+ struct Another : public Base
+ {
+ int x;
+ int y;
+ };
+}
+
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_13_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ {
+ // Make sure const cast works. Compilation is interesting, the
+ // functionality test here is just to make sure the compiler does
+ // not optimize things away ...
+ int x = 5;
+ int const & y = x;
+ const_cast<int&>(y) = 3;
+
+ if (x != 3)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("Wrong value after const_cast,"
+ " expected %d, got %d\n"),
+ 3, x));
+ }
+ }
+
+ // Make sure dynamic cast through pointers work ...
+ Derived d;
+ d.value = 24;
+ Base * b1 = &d;
+ Derived * d1 = dynamic_cast<Derived*>(b1);
+ if (d1 == 0)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("dynamic_cast returns null, expected value\n")));
+ }
+ d1->value = 42;
+ if (d.value != 42)
+ {
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("Wrong value after dynamic_cast, expected %d, got %d\n"),
+ 42, d.value));
+ }
+
+ // Make sure dynamic cast detects invalid casts
+ Another a;
+ Base * b2 = &a;
+ Derived * d2 = dynamic_cast<Derived*>(b2);
+ if (d2 != 0)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("dynamic_cast should return null\n")));
+ }
+
+ // Make sure dynamic cast raises an exception
+ Base & b3 = a;
+ try
+ {
+ (void) dynamic_cast<Derived&>(b3);
+
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("dynamic_cast should have raised exception\n")));
+ }
+ catch(std::exception const &)
+ {
+ }
+ catch(...)
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("dynamic_cast should have raised std::exception\n")));
+ }
+
+ {
+ // Just test these compile ...
+ double x = 42.0;
+ int y = static_cast<int>(x);
+ void * z = reinterpret_cast<void*>(y);
+
+ if (z == 0)
+ {
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("My hack to make sure the code is not "
+ "optimized away backfired!\n")));
+ }
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
diff --git a/ACE/tests/Compiler_Features_14_Test.cpp b/ACE/tests/Compiler_Features_14_Test.cpp
new file mode 100644
index 00000000000..e95b474887c
--- /dev/null
+++ b/ACE/tests/Compiler_Features_14_Test.cpp
@@ -0,0 +1,114 @@
+// $Id$
+
+/**
+ * @file
+ *
+ * This program checks if the compiler / platform supports partial
+ * template specialization. The motivation for this test was a
+ * discussion on the development mailing list, and the documentation
+ * was captured in:
+ *
+ * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3715
+ *
+ */
+
+#include "test_config.h"
+
+ACE_RCSID(tests, Compiler_Features_14_Test, "$Id$")
+
+// We are going to test if partial template specializations work by
+// demonstrating a standard technique in generic programming, i.e.,
+// using the specialization to detect if a type is a pointer.
+//
+// My implementation here is not very elegant, I would even say
+// ackward, and should not be taken as representative of good generic
+// programming techniques. I just wanted to through something
+// together.
+//
+
+// First some helper types in the anonymous namespace
+struct true_type {};
+struct false_type {};
+
+// Now a generic function to convert the types to booleans, moving
+// from generic type-based programming to classical value-based
+// programming.
+template<class T>
+bool to_boolean(T const&);
+
+template<>
+bool to_boolean(true_type const &)
+{
+ return true;
+}
+
+template<>
+bool to_boolean(false_type const &)
+{
+ return false;
+}
+
+// Here is the template, by default return false for all types.
+// Notice that this is a type *function*, it takes a type and returns
+// another type.
+template<typename T>
+struct is_pointer_function
+{
+ false_type result;
+};
+
+// Here is the specialization, for a class of types it results
+// something different. Effectively this is an implicit if() test on
+// the types.
+template<typename T>
+struct is_pointer_function<T*>
+{
+ true_type result;
+};
+
+// And here is a helper to convert back to values...
+struct test
+{
+ template<typename T>
+ static bool is_pointer()
+ {
+ is_pointer_function<T> v;
+ return to_boolean(v.result);
+ }
+};
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_14_Test"));
+
+ // As usual, the exit status from the test is 0 on success, 1 on
+ // failure
+ int status = 0;
+
+ if (test::is_pointer<int>())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("int should not be a pointer\n")));
+ }
+
+ if (! test::is_pointer<int*>())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("int* should be a pointer\n")));
+ }
+
+ if (test::is_pointer<int&>())
+ {
+ status = 1;
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("int& should not be a pointer\n")));
+ }
+
+ ACE_END_TEST;
+ return status;
+}
+
+
diff --git a/ACE/tests/Makefile.am b/ACE/tests/Makefile.am
index 737f93582d7..5aae1b38a47 100644
--- a/ACE/tests/Makefile.am
+++ b/ACE/tests/Makefile.am
@@ -643,6 +643,286 @@ Collection_Test_LDADD = \
libTest_Output.la \
$(ACE_BUILDDIR)/ace/libACE.la
+## Makefile.Compiler_Features_01_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_01_Test
+
+Compiler_Features_01_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_01_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_01_Test.cpp \
+
+Compiler_Features_01_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_02_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_02_Test
+
+Compiler_Features_02_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_02_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_02_Test.cpp \
+
+Compiler_Features_02_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_03_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_03_Test
+
+Compiler_Features_03_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_03_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_03_Test.cpp \
+
+Compiler_Features_03_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_04_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_04_Test
+
+Compiler_Features_04_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_04_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_04_Test.cpp \
+
+Compiler_Features_04_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_05_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_05_Test
+
+Compiler_Features_05_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_05_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_05_Test.cpp \
+
+Compiler_Features_05_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_06_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_06_Test
+
+Compiler_Features_06_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_06_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_06_Test.cpp \
+
+Compiler_Features_06_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_07_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_07_Test
+
+Compiler_Features_07_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_07_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_07_Test.cpp \
+
+Compiler_Features_07_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_08_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_08_Test
+
+Compiler_Features_08_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_08_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_08_Test.cpp \
+
+Compiler_Features_08_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_09_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_09_Test
+
+Compiler_Features_09_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_09_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_09_Test.cpp \
+
+Compiler_Features_09_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_10_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_10_Test
+
+Compiler_Features_10_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_10_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_10_Test.cpp \
+
+Compiler_Features_10_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_11_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_11_Test
+
+Compiler_Features_11_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_11_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_11_Test.cpp \
+
+Compiler_Features_11_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_12_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_12_Test
+
+Compiler_Features_12_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_12_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_12_Test.cpp \
+
+Compiler_Features_12_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_13_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_13_Test
+
+Compiler_Features_13_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_13_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_13_Test.cpp \
+
+Compiler_Features_13_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
+## Makefile.Compiler_Features_14_Test.am
+
+if !BUILD_ACE_FOR_TAO
+
+noinst_PROGRAMS += Compiler_Features_14_Test
+
+Compiler_Features_14_Test_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR)
+
+Compiler_Features_14_Test_SOURCES = \
+ $(ACE_ROOT)/tests/Main.cpp \
+ Compiler_Features_14_Test.cpp \
+
+Compiler_Features_14_Test_LDADD = \
+ libTest_Output.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+endif !BUILD_ACE_FOR_TAO
+
## Makefile.Config_Test.am
if !BUILD_ACE_FOR_TAO
diff --git a/ACE/tests/run_test.lst b/ACE/tests/run_test.lst
index a859e4ffaab..e907d1c9f9d 100644
--- a/ACE/tests/run_test.lst
+++ b/ACE/tests/run_test.lst
@@ -64,6 +64,19 @@ Cached_Conn_Test: !ACE_FOR_TAO !LabVIEW_RT
Capabilities_Test: !ACE_FOR_TAO
Codecs_Test: !NO_CODECS !ACE_FOR_TAO
Collection_Test
+Compiler_Features_01_Test
+Compiler_Features_02_Test
+Compiler_Features_03_Test
+Compiler_Features_04_Test
+Compiler_Features_05_Test
+Compiler_Features_06_Test
+Compiler_Features_07_Test
+Compiler_Features_08_Test
+Compiler_Features_09_Test
+Compiler_Features_11_Test
+Compiler_Features_12_Test
+Compiler_Features_13_Test
+Compiler_Features_14_Test
Config_Test: !LynxOS !VxWorks !ACE_FOR_TAO
Conn_Test: !ACE_FOR_TAO
DLL_Test: !Unicos !STATIC !KCC_Linux
diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc
index a4ed9620dd8..ad84660ef16 100644
--- a/ACE/tests/tests.mpc
+++ b/ACE/tests/tests.mpc
@@ -450,6 +450,104 @@ project(Collection Test) : acetest {
}
}
+project(Compiler_Features_01_Test) : acetest {
+ exename = Compiler_Features_01_Test
+ Source_Files {
+ Compiler_Features_01_Test.cpp
+ }
+}
+
+project(Compiler_Features_02_Test) : acetest {
+ exename = Compiler_Features_02_Test
+ Source_Files {
+ Compiler_Features_02_Test.cpp
+ }
+}
+
+project(Compiler_Features_03_Test) : acetest {
+ exename = Compiler_Features_03_Test
+ Source_Files {
+ Compiler_Features_03_Test.cpp
+ }
+}
+
+project(Compiler_Features_04_Test) : acetest {
+ exename = Compiler_Features_04_Test
+ Source_Files {
+ Compiler_Features_04_Test.cpp
+ }
+}
+
+project(Compiler_Features_05_Test) : acetest {
+ exename = Compiler_Features_05_Test
+ Source_Files {
+ Compiler_Features_05_Test.cpp
+ }
+}
+
+project(Compiler_Features_06_Test) : acetest {
+ exename = Compiler_Features_06_Test
+ Source_Files {
+ Compiler_Features_06_Test.cpp
+ }
+}
+
+project(Compiler_Features_07_Test) : acetest {
+ exename = Compiler_Features_07_Test
+ Source_Files {
+ Compiler_Features_07_Test.cpp
+ }
+}
+
+project(Compiler_Features_08_Test) : acetest {
+ exename = Compiler_Features_08_Test
+ Source_Files {
+ Compiler_Features_08_Test.cpp
+ }
+}
+
+project(Compiler_Features_09_Test) : acetest {
+ exename = Compiler_Features_09_Test
+ Source_Files {
+ Compiler_Features_09_Test.cpp
+ }
+}
+
+project(Compiler_Features_10_Test) : acetest {
+ exename = Compiler_Features_10_Test
+ Source_Files {
+ Compiler_Features_10_Test.cpp
+ }
+}
+
+project(Compiler_Features_11_Test) : acetest {
+ exename = Compiler_Features_11_Test
+ Source_Files {
+ Compiler_Features_11_Test.cpp
+ }
+}
+
+project(Compiler_Features_12_Test) : acetest {
+ exename = Compiler_Features_12_Test
+ Source_Files {
+ Compiler_Features_12_Test.cpp
+ }
+}
+
+project(Compiler_Features_13_Test) : acetest {
+ exename = Compiler_Features_13_Test
+ Source_Files {
+ Compiler_Features_13_Test.cpp
+ }
+}
+
+project(Compiler_Features_14_Test) : acetest {
+ exename = Compiler_Features_14_Test
+ Source_Files {
+ Compiler_Features_14_Test.cpp
+ }
+}
+
project(Config Test) : acetest {
avoids += ace_for_tao
exename = Config_Test