diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-02-16 16:05:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 16:05:33 +0100 |
commit | cb29bd46571e428d1d71c860ec9010d29a3a1fe4 (patch) | |
tree | 217863ac67489d725294c2be792708fd5c223976 | |
parent | 4665969af11545a831900244fd4ac6fa6f30a155 (diff) | |
parent | d14029823bf4be658affed6c0a413b45534e5cfe (diff) | |
download | ATCD-cb29bd46571e428d1d71c860ec9010d29a3a1fe4.tar.gz |
Merge pull request #573 from jwillemsen/jwi-taoidlleak
Add new C++ compiler test for testing a feature TAO is using
-rw-r--r-- | ACE/tests/Compiler_Features_38_Test.cpp | 42 | ||||
-rw-r--r-- | ACE/tests/run_test.lst | 1 | ||||
-rw-r--r-- | ACE/tests/tests.mpc | 7 | ||||
-rw-r--r-- | TAO/tests/Bug_3683_Regression/Echo.idl | 12 | ||||
-rw-r--r-- | TAO/tests/Bug_3683_Regression/Simple_util.h | 2 |
5 files changed, 56 insertions, 8 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..aae2d5a330e --- /dev/null +++ b/ACE/tests/Compiler_Features_38_Test.cpp @@ -0,0 +1,42 @@ +/** + * 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: + Foo_T () : member() {}; + 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 const 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 diff --git a/TAO/tests/Bug_3683_Regression/Echo.idl b/TAO/tests/Bug_3683_Regression/Echo.idl index ffc69e77ab6..52779336b89 100644 --- a/TAO/tests/Bug_3683_Regression/Echo.idl +++ b/TAO/tests/Bug_3683_Regression/Echo.idl @@ -2,24 +2,22 @@ #if !defined (_ECHO_IDL) #define _ECHO_IDL +// Defines an interface that encapsulates operations that return the +// mesg string to be displayed and shuts down the server. interface Echo { - // = TITLE - // Defines an interface that encapsulates operations that return the - // mesg string to be displayed and shuts down the server. - typedef sequence<Object> List; - List echo_list (in string message); // This operation returns the message as a sequence of Objects and // displays it on the screen as a string. + List echo_list (in string message); - string echo_string (in string message); // This operation returns the message as a string and displays it on // the screen. + string echo_string (in string message); - oneway void shutdown (); // This operation will shutdown the server. + oneway void shutdown (); }; #endif /* _ECHO_IDL */ diff --git a/TAO/tests/Bug_3683_Regression/Simple_util.h b/TAO/tests/Bug_3683_Regression/Simple_util.h index a890314a03c..b0564357d7c 100644 --- a/TAO/tests/Bug_3683_Regression/Simple_util.h +++ b/TAO/tests/Bug_3683_Regression/Simple_util.h @@ -27,7 +27,7 @@ * A template server definition. This template can be used by * single server/client projects for definition of their * server/clients. See the directories time, bank, echo for - * further details of implemenatation. + * further details of implementation. */ template <class Servant> class Server |