From 29e3cf75e50de40da55af433905c190478cd7045 Mon Sep 17 00:00:00 2001 From: jp4 Date: Fri, 10 Jul 1998 21:30:07 +0000 Subject: *** empty log message *** --- TAO/tests/Param_Test/any.cpp | 21 ++++++++++++++++++++- TAO/tests/Param_Test/bd_long_seq.cpp | 5 ++--- TAO/tests/Param_Test/bd_short_seq.cpp | 7 +++---- TAO/tests/Param_Test/client.cpp | 5 +++-- TAO/tests/Param_Test/ub_long_seq.cpp | 7 +++---- TAO/tests/Param_Test/ub_short_seq.cpp | 8 +++----- 6 files changed, 34 insertions(+), 19 deletions(-) diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp index b2b6df2aed5..db44317a840 100644 --- a/TAO/tests/Param_Test/any.cpp +++ b/TAO/tests/Param_Test/any.cpp @@ -170,6 +170,20 @@ Test_Any::add_args (CORBA::NVList_ptr ¶m_list, CORBA::NVList_ptr &retval, CORBA::Environment &env) { + CORBA::Any in_arg (CORBA::_tc_any, &this->in_, 0); + CORBA::Any inout_arg (CORBA::_tc_any, &this->inout_, 0); + CORBA::Any out_arg (CORBA::_tc_any, &this->out_, 0); + + // add parameters + (void)param_list->add_value ("o1", in_arg, CORBA::ARG_IN, env); + (void)param_list->add_value ("o2", inout_arg, CORBA::ARG_INOUT, env); + (void)param_list->add_value ("o3", out_arg, CORBA::ARG_OUT, env); + + // add return value + (void)retval->item (0, env)->value ()->replace (CORBA::_tc_any, + 0, + CORBA::B_FALSE, // does not own + env); return 0; } @@ -218,7 +232,7 @@ Test_Any::check_validity (void) else if ((this->in_ >>= obj_in) && (this->inout_ >>= obj_inout) && (this->out_.in () >>= obj_out) && - (this->ret_.in () >>= obj_ret)) + (this->ret_.in () >>= obj_ret)) { // all the >>= operators returned true so we are OK. return 1; @@ -230,6 +244,11 @@ Test_Any::check_validity (void) CORBA::Boolean Test_Any::check_validity (CORBA::Request_ptr req) { + CORBA::Environment env; + + *req->arguments ()->item (2, env)->value () >>= *this->out_; + *req->result ()->value () >>= *this->ret_; + return this->check_validity (); } diff --git a/TAO/tests/Param_Test/bd_long_seq.cpp b/TAO/tests/Param_Test/bd_long_seq.cpp index 2da272ba0a5..c55ab12b666 100644 --- a/TAO/tests/Param_Test/bd_long_seq.cpp +++ b/TAO/tests/Param_Test/bd_long_seq.cpp @@ -25,7 +25,7 @@ // ************************************************************************ Test_Bounded_Long_Sequence::Test_Bounded_Long_Sequence (void) - : opname_ (CORBA::string_dup ("test_bounded_longseq")), + : opname_ (CORBA::string_dup ("test_bounded_long_sequence")), in_ (new Param_Test::Bounded_Long_Seq), inout_ (new Param_Test::Bounded_Long_Seq), out_ (0), @@ -132,7 +132,6 @@ Test_Bounded_Long_Sequence::check_validity (void) CORBA::Boolean Test_Bounded_Long_Sequence::check_validity (CORBA::Request_ptr req) { -#if 0 CORBA::Environment env; Param_Test::Bounded_Long_Seq *out, *ret; @@ -142,7 +141,7 @@ Test_Bounded_Long_Sequence::check_validity (CORBA::Request_ptr req) this->out_ = out; this->ret_ = ret; -#endif + return this->check_validity (); } diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp index c4814137e3b..4fa347c1332 100644 --- a/TAO/tests/Param_Test/bd_short_seq.cpp +++ b/TAO/tests/Param_Test/bd_short_seq.cpp @@ -25,7 +25,7 @@ // ************************************************************************ Test_Bounded_Short_Sequence::Test_Bounded_Short_Sequence (void) - : opname_ (CORBA::string_dup ("test_bounded_shortseq")), + : opname_ (CORBA::string_dup ("test_bounded_short_sequence")), in_ (new Param_Test::Bounded_Short_Seq), inout_ (new Param_Test::Bounded_Short_Seq), out_ (0), @@ -81,7 +81,7 @@ Test_Bounded_Short_Sequence::run_sii_test (Param_Test_ptr objref, { Param_Test::Bounded_Short_Seq_out out (this->out_.out ()); this->ret_ = objref->test_bounded_short_sequence (this->in_.in (), - this->inout_.inout (), + this->inout_.inout (), out, env); return (env.exception () ? -1:0); @@ -135,7 +135,6 @@ Test_Bounded_Short_Sequence::check_validity (void) CORBA::Boolean Test_Bounded_Short_Sequence::check_validity (CORBA::Request_ptr req) { -#if 0 CORBA::Environment env; Param_Test::Bounded_Short_Seq *out, *ret; @@ -145,7 +144,7 @@ Test_Bounded_Short_Sequence::check_validity (CORBA::Request_ptr req) this->out_ = out; this->ret_ = ret; -#endif + return this->check_validity (); } diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp index a9a39e5a143..e704adba847 100644 --- a/TAO/tests/Param_Test/client.cpp +++ b/TAO/tests/Param_Test/client.cpp @@ -149,8 +149,9 @@ Param_Test_Client::run_dii_test (void) // time required to create and populate the NVList this->results_.start_timer (); - // first create the argument list and populate it - this->orb_->create_list (3, nvlist); + // first create the argument list (length 0 because args are *added*) + this->orb_->create_list (0, nvlist); + // then the result holder (length 1 because value is *replaced*) this->orb_->create_list (1, retval); // add arguments and typecode for return valueto the NVList diff --git a/TAO/tests/Param_Test/ub_long_seq.cpp b/TAO/tests/Param_Test/ub_long_seq.cpp index 65759c41e34..7876dd03488 100644 --- a/TAO/tests/Param_Test/ub_long_seq.cpp +++ b/TAO/tests/Param_Test/ub_long_seq.cpp @@ -25,7 +25,7 @@ // ************************************************************************ Test_Long_Sequence::Test_Long_Sequence (void) - : opname_ (CORBA::string_dup ("test_longseq")), + : opname_ (CORBA::string_dup ("test_long_sequence")), in_ (new Param_Test::Long_Seq), inout_ (new Param_Test::Long_Seq), out_ (0), @@ -104,7 +104,7 @@ Test_Long_Sequence::add_args (CORBA::NVList_ptr ¶m_list, // add return value type (void)retval->item (0, env)->value ()->replace (Param_Test::_tc_Long_Seq, 0, - 0, // does not own + CORBA::B_FALSE, // does not own env); return 0; } @@ -134,7 +134,6 @@ Test_Long_Sequence::check_validity (void) CORBA::Boolean Test_Long_Sequence::check_validity (CORBA::Request_ptr req) { -#if 0 CORBA::Environment env; Param_Test::Long_Seq *out, *ret; @@ -144,7 +143,7 @@ Test_Long_Sequence::check_validity (CORBA::Request_ptr req) this->out_ = out; this->ret_ = ret; -#endif + return this->check_validity (); } diff --git a/TAO/tests/Param_Test/ub_short_seq.cpp b/TAO/tests/Param_Test/ub_short_seq.cpp index 9b22945c0e0..4c539b9f4af 100644 --- a/TAO/tests/Param_Test/ub_short_seq.cpp +++ b/TAO/tests/Param_Test/ub_short_seq.cpp @@ -25,7 +25,7 @@ // ************************************************************************ Test_Short_Sequence::Test_Short_Sequence (void) - : opname_ (CORBA::string_dup ("test_shortseq")), + : opname_ (CORBA::string_dup ("test_short_sequence")), in_ (new Param_Test::Short_Seq), inout_ (new Param_Test::Short_Seq), out_ (0), @@ -83,7 +83,7 @@ Test_Short_Sequence::run_sii_test (Param_Test_ptr objref, { Param_Test::Short_Seq_out out (this->out_.out ()); this->ret_ = objref->test_short_sequence (this->in_.in (), - this->inout_.inout (), + this->inout_.inout (), out, env); return (env.exception () ? -1:0); @@ -107,7 +107,7 @@ Test_Short_Sequence::add_args (CORBA::NVList_ptr ¶m_list, // add return value type (void)retval->item (0, env)->value ()->replace (Param_Test::_tc_Short_Seq, 0, - 0, // does not own + CORBA::B_FALSE, // does not own env); return 0; } @@ -137,7 +137,6 @@ Test_Short_Sequence::check_validity (void) CORBA::Boolean Test_Short_Sequence::check_validity (CORBA::Request_ptr req) { -#if 0 CORBA::Environment env; Param_Test::Short_Seq *out, *ret; @@ -148,7 +147,6 @@ Test_Short_Sequence::check_validity (CORBA::Request_ptr req) this->out_ = out; this->ret_ = ret; -#endif return this->check_validity (); } -- cgit v1.2.1