From 0b1e33835dcdb9397c9eeb23eef5db53908d87e0 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 16 Feb 2018 10:23:28 +0100 Subject: Convert to doxygen style comments * TAO/tests/Bug_3683_Regression/Echo.idl: --- TAO/tests/Bug_3683_Regression/Echo.idl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 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 */ -- cgit v1.2.1 From 4473a426454c16a2d7af7328778369d603d701ca Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 16 Feb 2018 10:23:41 +0100 Subject: Fixed typo in comment * TAO/tests/Bug_3683_Regression/Simple_util.h: --- TAO/tests/Bug_3683_Regression/Simple_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Server -- cgit v1.2.1 From 56cba7ad62f51463ddaf89894db16cabc2193b9c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 16 Feb 2018 11:36:35 +0100 Subject: 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: --- ACE/tests/Compiler_Features_38_Test.cpp | 41 +++++++++++++++++++++++++++++++++ ACE/tests/run_test.lst | 1 + ACE/tests/tests.mpc | 7 ++++++ 3 files changed, 49 insertions(+) create mode 100644 ACE/tests/Compiler_Features_38_Test.cpp 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 +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 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 -- cgit v1.2.1 From 785cca646211feed9c238cf8d219687b85552546 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 16 Feb 2018 12:09:57 +0100 Subject: Add constructor to make codacy happy * ACE/tests/Compiler_Features_38_Test.cpp: --- ACE/tests/Compiler_Features_38_Test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ACE/tests/Compiler_Features_38_Test.cpp b/ACE/tests/Compiler_Features_38_Test.cpp index ff1a21abb51..b2a03655833 100644 --- a/ACE/tests/Compiler_Features_38_Test.cpp +++ b/ACE/tests/Compiler_Features_38_Test.cpp @@ -9,6 +9,7 @@ template class Foo_T { public: + Foo_T () {}; typedef T& T_elem; T_elem operator[] (long) { return member; } operator T *& () { return & member; }; -- cgit v1.2.1 From d14029823bf4be658affed6c0a413b45534e5cfe Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 16 Feb 2018 12:39:02 +0100 Subject: Initialise member to solve Codacy warning * ACE/tests/Compiler_Features_38_Test.cpp: --- ACE/tests/Compiler_Features_38_Test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACE/tests/Compiler_Features_38_Test.cpp b/ACE/tests/Compiler_Features_38_Test.cpp index b2a03655833..aae2d5a330e 100644 --- a/ACE/tests/Compiler_Features_38_Test.cpp +++ b/ACE/tests/Compiler_Features_38_Test.cpp @@ -9,7 +9,7 @@ template class Foo_T { public: - Foo_T () {}; + Foo_T () : member() {}; typedef T& T_elem; T_elem operator[] (long) { return member; } operator T *& () { return & member; }; @@ -29,7 +29,7 @@ run_main (int, ACE_TCHAR *[]) ACE_START_TEST (ACE_TEXT("Compiler_Features_38_Test")); Foo2Seq f2; - long j = f2[0].i; + long const j = f2[0].i; ACE_UNUSED_ARG(j); ACE_DEBUG ((LM_INFO, -- cgit v1.2.1