summaryrefslogtreecommitdiff
path: root/TAO/tests/AMI/ami_test_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/AMI/ami_test_i.cpp')
-rw-r--r--TAO/tests/AMI/ami_test_i.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/TAO/tests/AMI/ami_test_i.cpp b/TAO/tests/AMI/ami_test_i.cpp
index cc30da0f035..dd18af1af6c 100644
--- a/TAO/tests/AMI/ami_test_i.cpp
+++ b/TAO/tests/AMI/ami_test_i.cpp
@@ -19,10 +19,16 @@
ACE_RCSID(AMI, ami_test_i, "$Id$")
-AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb)
+AMI_Test_i::AMI_Test_i (CORBA::ORB_ptr orb,
+ CORBA::Long in_l,
+ const char * in_str,
+ bool check_params)
: orb_ (CORBA::ORB::_duplicate (orb)),
number_ ((CORBA::Long) 931232),
- yadda_ ((CORBA::Long) 140474)
+ yadda_ ((CORBA::Long) 140474),
+ in_l_ (in_l),
+ in_str_(CORBA::string_dup(in_str)),
+ check_params_(check_params)
{
}
@@ -30,8 +36,6 @@ CORBA::Long
AMI_Test_i::foo (CORBA::Long_out out_l,
CORBA::Long in_l,
const char* in_str)
- ACE_THROW_SPEC ((CORBA::SystemException,
- A::DidTheRightThing))
{
out_l = 931233;
@@ -45,17 +49,25 @@ AMI_Test_i::foo (CORBA::Long_out out_l,
{
ACE_DEBUG ((LM_DEBUG,
"Throwing Exception: A::DidTheRightThing\n"));
- ACE_THROW_RETURN (A::DidTheRightThing(), 0);
+ throw A::DidTheRightThing();
+ }
+
+ if (check_params_)
+ {
+ if (in_l_ != in_l || ACE_OS::strcmp(in_str_.in (), in_str) != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "ERROR: Parameter corruption on in parameters: %d %d %s %s.\n",
+ in_l_, in_l, in_str_.in (), in_str));
+ }
+ return 0;
}
return 931234;
}
-
-
void
AMI_Test_i::shutdown (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0);
}
@@ -63,7 +75,6 @@ AMI_Test_i::shutdown (void)
CORBA::Long
AMI_Test_i::yadda (void)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
"%N:%l:(%P:%t):AMI_Test_i::(get_)yadda\n"));
@@ -73,7 +84,6 @@ AMI_Test_i::yadda (void)
void
AMI_Test_i::yadda (CORBA::Long yadda)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
"%N:%l:(%P:%t):AMI_Test_i::(set_)yadda\n"));
@@ -82,7 +92,6 @@ AMI_Test_i::yadda (CORBA::Long yadda)
void
AMI_Test_i::inout_arg_test (char *&)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// No action, this operation is to test code generation for INOUT
// args in AMI operations.