summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/ub_str_seq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/ub_str_seq.cpp')
-rw-r--r--TAO/tests/Param_Test/ub_str_seq.cpp83
1 files changed, 23 insertions, 60 deletions
diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp
index c64107fb3bc..301a40ce27c 100644
--- a/TAO/tests/Param_Test/ub_str_seq.cpp
+++ b/TAO/tests/Param_Test/ub_str_seq.cpp
@@ -50,7 +50,30 @@ void
Test_String_Sequence::dii_req_invoke (CORBA::Request *req,
CORBA::Environment &ACE_TRY_ENV)
{
+ req->add_in_arg ("s1") <<= this->in_.in ();
+ req->add_inout_arg ("s2") <<= this->inout_.in ();
+ req->add_out_arg ("s3") <<= this->out_.in ();
+
+ req->set_return_type (Param_Test::_tc_StrSeq);
+
req->invoke (ACE_TRY_ENV);
+ ACE_CHECK;
+
+ Param_Test::StrSeq *tmp;
+ req->return_value () >>= tmp;
+ this->ret_ = new Param_Test::StrSeq (*tmp);
+
+ CORBA::NamedValue_ptr o2 =
+ req->arguments ()->item (1, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o2->value () >>= tmp;
+ this->inout_ = new Param_Test::StrSeq (*tmp);
+
+ CORBA::NamedValue_ptr o3 =
+ req->arguments ()->item (2, ACE_TRY_ENV);
+ ACE_CHECK;
+ *o3->value () >>= tmp;
+ this->out_ = new Param_Test::StrSeq (*tmp);
}
int
@@ -115,66 +138,6 @@ Test_String_Sequence::run_sii_test (Param_Test_ptr objref,
return -1;
}
-int
-Test_String_Sequence::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_StrSeq,
- (void *) &this->in_.in (),
- 0);
-
- CORBA::Any inout_arg (Param_Test::_tc_StrSeq,
- &this->inout_.inout (),
- 0);
-
- CORBA::Any out_arg (Param_Test::_tc_StrSeq,
- &this->out_.inout (), // .out () causes crash
- 0);
-
- // add parameters
- param_list->add_value ("s1",
- in_arg,
- CORBA::ARG_IN,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("s2",
- inout_arg,
- CORBA::ARG_INOUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("s3",
- out_arg,
- CORBA::ARG_OUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- CORBA::NamedValue *item = retval->item (0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- item->value ()->replace (Param_Test::_tc_StrSeq,
- &this->ret_.inout (),
- 0, // does not own
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_String_Sequence::add_args\n");
-
- }
- ACE_ENDTRY;
- return -1;
-}
-
CORBA::Boolean
Test_String_Sequence::check_validity (void)
{