summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/big_union.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/big_union.cpp')
-rw-r--r--TAO/tests/Param_Test/big_union.cpp86
1 files changed, 24 insertions, 62 deletions
diff --git a/TAO/tests/Param_Test/big_union.cpp b/TAO/tests/Param_Test/big_union.cpp
index ee26fe2d964..72ffa97fd58 100644
--- a/TAO/tests/Param_Test/big_union.cpp
+++ b/TAO/tests/Param_Test/big_union.cpp
@@ -48,7 +48,30 @@ void
Test_Big_Union::dii_req_invoke (CORBA::Request *req,
CORBA::Environment &ACE_TRY_ENV)
{
+ req->add_in_arg ("s1") <<= this->in_;
+ req->add_inout_arg ("s2") <<= this->inout_;
+ req->add_out_arg ("s3") <<= this->out_.in ();
+
+ req->set_return_type (Param_Test::_tc_Big_Union);
+
req->invoke (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ Param_Test::Big_Union *tmp;
+ req->return_value () >>= tmp;
+ this->ret_ = new Param_Test::Big_Union (*tmp);
+
+ CORBA::NamedValue_ptr o2 =
+ req->arguments ()->item (1, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o2->value () >>= tmp;
+ this->inout_ = *tmp;
+
+ CORBA::NamedValue_ptr o3 =
+ req->arguments ()->item (2, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o3->value () >>= tmp;
+ this->out_ = new Param_Test::Big_Union (*tmp);
}
int
@@ -224,67 +247,6 @@ Test_Big_Union::run_sii_test (Param_Test_ptr objref,
return -1;
}
-int
-Test_Big_Union::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &ACE_TRY_ENV)
-{
- ACE_TRY
- {
- CORBA::Any in_arg (Param_Test::_tc_Big_Union,
- &this->in_,
- 0);
-
- CORBA::Any inout_arg (Param_Test::_tc_Big_Union,
- &this->inout_,
- 0);
-
- CORBA::Any out_arg (Param_Test::_tc_Big_Union,
- &this->out_.inout (),
- 0);
-
- // add parameters
- param_list->add_value ("u1",
- in_arg,
- CORBA::ARG_IN,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("u2",
- inout_arg,
- CORBA::ARG_INOUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("u3",
- out_arg,
- CORBA::ARG_OUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- // add return value
- CORBA::NamedValue *item = retval->item (0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- item->value ()->replace (Param_Test::_tc_Big_Union,
- &this->ret_.inout (),
- 0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Big_Union::add_args\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
CORBA::Boolean
Test_Big_Union::check_validity (void)
{
@@ -311,7 +273,7 @@ Test_Big_Union::check_validity (void)
|| in_array[i] != out_array[i]
|| in_array[i] != ret_array[i])
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
"mismatch of arrays\n"));
return 0;
}