summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2017-09-05 13:31:49 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2017-09-05 13:31:49 +0200
commit1cdfec588f4c562f9df8c9daedcad88c99040fc4 (patch)
tree44c031bbcf9bb03f1985da81df267f1011431985 /TAO/tests/IDL_Test
parent564f8735931b2a13401b4c966894633fcb664e82 (diff)
downloadATCD-1cdfec588f4c562f9df8c9daedcad88c99040fc4.tar.gz
Extended TAO_IDL with a new -Gsd which enabled the generation of two additional static operations for each interface. _desc_repository_id to retrieve the repository id as string, second _desc_interface_name to return the interface name. Both can be useful in template meta programming use cases where we want to use the repository id or interface name of a specific type.
* ACE/tests/Reactor_Exceptions_Test.cpp: * TAO/TAO_IDL/be/be_global.cpp: * TAO/TAO_IDL/be/be_util.cpp: * TAO/TAO_IDL/be/be_visitor_argument/argument.cpp: * TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp: * TAO/TAO_IDL/be_include/be_global.h: * TAO/docs/compiler.html: * TAO/tests/IDL_Test/IDL_Test.mpc: * TAO/tests/IDL_Test/main.cpp:
Diffstat (limited to 'TAO/tests/IDL_Test')
-rw-r--r--TAO/tests/IDL_Test/IDL_Test.mpc3
-rw-r--r--TAO/tests/IDL_Test/main.cpp64
2 files changed, 41 insertions, 26 deletions
diff --git a/TAO/tests/IDL_Test/IDL_Test.mpc b/TAO/tests/IDL_Test/IDL_Test.mpc
index 7f439bb428c..8ef9a6b2d1e 100644
--- a/TAO/tests/IDL_Test/IDL_Test.mpc
+++ b/TAO/tests/IDL_Test/IDL_Test.mpc
@@ -6,7 +6,8 @@ project(*IDL): taoserver, messaging, gen_ostream {
idlflags += -Wb,stub_export_macro=TAO_IDL_TEST_STUB_Export \
-Wb,stub_export_include=TAO_IDL_TEST_stub_export.h \
-Wb,skel_export_macro=TAO_IDL_TEST_STUB_Export \
- -Wb,skel_export_include=TAO_IDL_TEST_stub_export.h
+ -Wb,skel_export_include=TAO_IDL_TEST_stub_export.h \
+ -Gsd
IDL_Files {
idlflags += -Gxhst
diff --git a/TAO/tests/IDL_Test/main.cpp b/TAO/tests/IDL_Test/main.cpp
index b79a728883e..1fd8c57b4ef 100644
--- a/TAO/tests/IDL_Test/main.cpp
+++ b/TAO/tests/IDL_Test/main.cpp
@@ -90,7 +90,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (test_ull != AAA)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("Generated value of unsigned")
ACE_TEXT (" long long AAA in constants.idl")
ACE_TEXT (" is incorrect\n")));
@@ -101,7 +101,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (test_nll != NAAA)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("Generated value of signed")
ACE_TEXT (" long long NAAA in constants.idl")
ACE_TEXT (" is incorrect\n")));
@@ -112,7 +112,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (test_pll != PAAA)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("Generated value of signed")
ACE_TEXT (" long long PAAA in constants.idl")
ACE_TEXT (" is incorrect\n")));
@@ -142,7 +142,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:anvil.com/hello:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'hello'\n"));
}
@@ -155,7 +155,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:anvil.com/goodbye:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'goodbye'\n"));
}
@@ -168,7 +168,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:hammer.com/salutation/sayonara:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'sayonara'\n"));
}
@@ -187,7 +187,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:anvil.com/ciao:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'ciao'\n"));
}
@@ -200,7 +200,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:anvil.com/aloha:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'aloha'\n"));
}
@@ -212,7 +212,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:gleep_prefix/gleep/schmooze:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schmooze'\n"));
}
@@ -222,7 +222,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:gleep_prefix/gleep/schmeer:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schmeer'\n"));
}
@@ -232,7 +232,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:gleep_prefix/gleep/schlemiel:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schlemiel'\n"));
}
@@ -242,7 +242,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:gleep_prefix/gleep/spilkis:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'spilkis'\n"));
}
@@ -252,7 +252,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"ABRA:cadabra/hocus/pocus:1.23"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schmuck'\n"));
}
@@ -262,9 +262,23 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:floop_prefix/gleep/floop/schmendrick:524.23"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schmendrick'\n"));
}
+ if (ACE_OS::strcmp (gleep::floop::schmendrick::_desc_repository_id (),
+ "IDL:floop_prefix/gleep/floop/schmendrick:524.23"))
+ {
+ ++error_count;
+ ACE_ERROR ((LM_ERROR,
+ "error in _desc_repository_id 'schmendrick'\n"));
+ }
+ if (ACE_OS::strcmp (gleep::floop::schmendrick::_desc_interface_name (),
+ "schmendrick"))
+ {
+ ++error_count;
+ ACE_ERROR ((LM_ERROR,
+ "error in _desc_interface_name 'schmendrick'\n"));
+ }
schlemazel_i s_schlemazel;
@@ -274,7 +288,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schlemazel'\n"));
}
@@ -284,7 +298,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"IDL:gleep_prefix/gleep/schmegegging:1.0"))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"pragma prefix error in object 'schmegegging'\n"));
}
@@ -303,7 +317,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (!x._is_a (base[i]))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"something_handler::_is_a should return true for %C\n",
base[i]));
}
@@ -312,7 +326,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (!dynamic_cast<POA_bug_1985_c::d::AMI_somethingHandler*> (&x))
{
++error_count;
- ACE_DEBUG( (LM_DEBUG,
+ ACE_ERROR( (LM_ERROR,
"mismatch in downcast for %C\n",
base[0]));
}
@@ -320,7 +334,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (!dynamic_cast<POA_bug_1985_a::b::AMI_somethingHandler*> (&x))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"mismatch in downcast for %C\n",
base[1]));
}
@@ -328,7 +342,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (!dynamic_cast<POA_Messaging::ReplyHandler*> (&x))
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"mismatch in downcast for %C\n",
base[2]));
}
@@ -349,7 +363,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if ((any1 >>= outfield) == 0)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"error in extraction of "
"duplicate case label value\n"));
}
@@ -359,7 +373,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (ACE_OS::strcmp (str, "duplicate case label test string") != 0)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"error - corruption of "
"duplicate case label value\n"));
}
@@ -370,7 +384,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if ((any1 >>= outfield) == 0)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"error in extraction of "
"default case label value\n"));
}
@@ -380,7 +394,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (ACE_OS::strcmp (str, "default case test string") != 0)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"error - corruption of "
"default case label value\n"));
}
@@ -388,7 +402,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (SignedGen::val != -3)
{
++error_count;
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"error - signed integer literal "
"generated as unsigned\n"));
}