summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/tests/Bug_2669_Regression/Child.idl4
-rw-r--r--TAO/tests/Bug_2669_Regression/client.cpp34
2 files changed, 24 insertions, 14 deletions
diff --git a/TAO/tests/Bug_2669_Regression/Child.idl b/TAO/tests/Bug_2669_Regression/Child.idl
index cc6dac2f24b..fd35fee57e6 100644
--- a/TAO/tests/Bug_2669_Regression/Child.idl
+++ b/TAO/tests/Bug_2669_Regression/Child.idl
@@ -5,10 +5,10 @@
*/
//=============================================================================
-#include "Parent.idl"
-
#pragma prefix "child.pragma.prefix"
+#include "Parent.idl"
+
interface ChildInterface : ParentInterface {};
module ChildModule
diff --git a/TAO/tests/Bug_2669_Regression/client.cpp b/TAO/tests/Bug_2669_Regression/client.cpp
index ec1910c1fc2..f840ef82b8b 100644
--- a/TAO/tests/Bug_2669_Regression/client.cpp
+++ b/TAO/tests/Bug_2669_Regression/client.cpp
@@ -8,6 +8,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/OS_NS_string.h"
#include "ChildS.h"
@@ -45,7 +46,7 @@ public:
NonRelatedChildHandler (void) {};
~NonRelatedChildHandler (void) {};
};
-
+
int
main (int argc, char *argv[])
{
@@ -80,14 +81,23 @@ main (int argc, char *argv[])
// Create two handlers
ChildHandler child_handler;
NonRelatedChildHandler non_related_child_handler;
-
+
ChildModule::AMI_ChildInterfaceHandler_var the_child_handler_var =
child_handler._this ();
-
+
+ const char * expectedid = "IDL:child.pragma.prefix/ChildModule/AMI_ChildInterfaceHandler:1.0";
+ if (ACE_OS::strcmp (the_child_handler_var->_interface_repository_id (), expectedid) != 0)
+ {
+ ACE_ERROR ((LM_ERROR, "Error: REGRESSION - ChildModule::repository id is "
+ "incorrectly generated, received %s\n",
+ the_child_handler_var->_interface_repository_id ()));
+ result = 1;
+ }
+
// This handler has no relationship with the above in IDL.
AMI_ChildInterfaceHandler_var the_non_related_child_handler_var =
non_related_child_handler._this ();
-
+
// Check that both handler objects narrow successfully to their parent
// handler types...
ParentModule::AMI_ParentInterfaceHandler_var the_parent_handler_var =
@@ -95,17 +105,17 @@ main (int argc, char *argv[])
if (CORBA::is_nil (the_parent_handler_var.in ()))
{
- ACE_DEBUG ((LM_ERROR, "Error: REGRESSION - Cannot narrow ChildModule::ChildInterface "
+ ACE_ERROR ((LM_ERROR, "Error: REGRESSION - Cannot narrow ChildModule::ChildInterface "
"reply handler to its parent handler type.\n"));
result = 1;
}
-
+
AMI_ParentInterfaceHandler_var the_non_related_parent_handler_var =
AMI_ParentInterfaceHandler::_narrow (the_non_related_child_handler_var.in ());
if (CORBA::is_nil (the_non_related_parent_handler_var.in ()))
{
- ACE_DEBUG ((LM_ERROR, "Error: REGRESSION - Cannot narrow ChildInterface "
+ ACE_ERROR ((LM_ERROR, "Error: REGRESSION - Cannot narrow ChildInterface "
"reply handler to its parent handler type.\n"));
result = 1;
}
@@ -117,25 +127,25 @@ main (int argc, char *argv[])
if (! CORBA::is_nil (the_parent_handler_var.in ()))
{
- ACE_DEBUG ((LM_ERROR, "Error: REGRESSION - ChildModule::ChildInterface reply handler "
+ ACE_ERROR ((LM_ERROR, "Error: REGRESSION - ChildModule::ChildInterface reply handler "
"narrows to unrelated type.\n"));
result = 1;
}
-
+
the_non_related_parent_handler_var =
AMI_ParentInterfaceHandler::_narrow (the_child_handler_var.in ());
if (! CORBA::is_nil (the_non_related_parent_handler_var.in ()))
{
- ACE_DEBUG ((LM_ERROR, "Error: REGRESSION - ChildModule::ChildInterface reply handler "
+ ACE_ERROR ((LM_ERROR, "Error: REGRESSION - ChildModule::ChildInterface reply handler "
"narrows to unrelated type.\n"));
result = 1;
}
poa_var->destroy (1,0);
-
+
orb->destroy ();
-
+
}
ACE_CATCHANY
{