summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2018-02-16 11:36:35 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2018-02-16 11:36:35 +0100
commit56cba7ad62f51463ddaf89894db16cabc2193b9c (patch)
treeb1c4f319638a1625e1deef527c4b658ce280b2e7
parent4473a426454c16a2d7af7328778369d603d701ca (diff)
downloadATCD-56cba7ad62f51463ddaf89894db16cabc2193b9c.tar.gz
Add new compiler test for a C++ feature TAO is using
* ACE/tests/Compiler_Features_38_Test.cpp: Added. * ACE/tests/run_test.lst: * ACE/tests/tests.mpc:
-rw-r--r--ACE/tests/Compiler_Features_38_Test.cpp41
-rw-r--r--ACE/tests/run_test.lst1
-rw-r--r--ACE/tests/tests.mpc7
3 files changed, 49 insertions, 0 deletions
diff --git a/ACE/tests/Compiler_Features_38_Test.cpp b/ACE/tests/Compiler_Features_38_Test.cpp
new file mode 100644
index 00000000000..ff1a21abb51
--- /dev/null
+++ b/ACE/tests/Compiler_Features_38_Test.cpp
@@ -0,0 +1,41 @@
+/**
+ * This program checks if the compiler doesn't have a certain bug
+ * that we encountered when testing with TAO
+ */
+
+#include "test_config.h"
+
+template <typename T>
+class Foo_T
+{
+public:
+ typedef T& T_elem;
+ T_elem operator[] (long) { return member; }
+ operator T *& () { return & member; };
+private:
+ T member;
+};
+
+struct Foo2
+{
+ long i;
+};
+typedef Foo_T<Foo2> Foo2Seq;
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT("Compiler_Features_38_Test"));
+
+ Foo2Seq f2;
+ long j = f2[0].i;
+ ACE_UNUSED_ARG(j);
+
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("C++ support ok\n")));
+
+ ACE_END_TEST;
+
+ return 0;
+}
+
diff --git a/ACE/tests/run_test.lst b/ACE/tests/run_test.lst
index 47fbaa95c58..a8813ba3611 100644
--- a/ACE/tests/run_test.lst
+++ b/ACE/tests/run_test.lst
@@ -108,6 +108,7 @@ Compiler_Features_34_Test
Compiler_Features_35_Test
Compiler_Features_36_Test
Compiler_Features_37_Test
+Compiler_Features_38_Test
Config_Test: !LynxOS !VxWorks !ACE_FOR_TAO
Conn_Test: !ACE_FOR_TAO
DLL_Test: !STATIC Linux
diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc
index 6a567598f25..4d89537b112 100644
--- a/ACE/tests/tests.mpc
+++ b/ACE/tests/tests.mpc
@@ -844,6 +844,13 @@ project(Compiler_Features_37_Test) : acetest {
}
}
+project(Compiler_Features_38_Test) : acetest {
+ exename = Compiler_Features_38_Test
+ Source_Files {
+ Compiler_Features_38_Test.cpp
+ }
+}
+
project(Config Test) : acetest {
avoids += ace_for_tao
exename = Config_Test