diff options
author | jp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-09 03:50:04 +0000 |
---|---|---|
committer | jp4 <jp4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-09 03:50:04 +0000 |
commit | a79e69a8eb6d4bd460b5d73ccc3a992d97874986 (patch) | |
tree | caa8ff7a4d83c8ebd9dabdc905c0b9d24cd23283 | |
parent | cd7ce8deaf2a296d15e6cd0f2cb3f58c4e483c8a (diff) | |
download | ATCD-a79e69a8eb6d4bd460b5d73ccc3a992d97874986.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 10 | ||||
-rw-r--r-- | TAO/tests/Param_Test/any.cpp | 49 | ||||
-rw-r--r-- | TAO/tests/Param_Test/any.h | 1 | ||||
-rw-r--r-- | TAO/tests/Param_Test/fixed_array.cpp | 41 | ||||
-rw-r--r-- | TAO/tests/Param_Test/fixed_array.h | 10 | ||||
-rw-r--r-- | TAO/tests/Param_Test/nested_struct.cpp | 56 | ||||
-rw-r--r-- | TAO/tests/Param_Test/nested_struct.h | 13 | ||||
-rw-r--r-- | TAO/tests/Param_Test/var_array.cpp | 44 | ||||
-rw-r--r-- | TAO/tests/Param_Test/var_array.h | 13 | ||||
-rw-r--r-- | TAO/tests/Param_Test/var_struct.cpp | 70 | ||||
-rw-r--r-- | TAO/tests/Param_Test/var_struct.h | 13 |
11 files changed, 111 insertions, 209 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index fe6de266c9b..14700861287 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,13 @@ +Sat Aug 8 22:47:22 1998 Jeff Parsons <jp4@cs.wustl.edu> + + * Param_Test/fixed_array.{h,cpp}: + * Param_Test/var_array.{h,cpp}: + * Param_Test/var_struct.{h,cpp}: + * Param_Test/nested_struct.{h,cpp}: + * Param_Test/any.{h,cpp}: + + DII tests now work with _vars and are CORBA-compliant. + Sat Aug 8 21:28:33 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * tao/Exception.h: diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp index 27df0174769..b7231413263 100644 --- a/TAO/tests/Param_Test/any.cpp +++ b/TAO/tests/Param_Test/any.cpp @@ -16,8 +16,6 @@ // // ============================================================================ -#include "helper.h" - #include "any.h" ACE_RCSID(Param_Test, any, "$Id$") @@ -27,7 +25,9 @@ ACE_RCSID(Param_Test, any, "$Id$") // ************************************************************************ Test_Any::Test_Any (void) - : opname_ (CORBA::string_dup ("test_any")) + : opname_ (CORBA::string_dup ("test_any")), + out_ (new CORBA::Any), + ret_ (new CORBA::Any) { } @@ -63,8 +63,7 @@ Test_Any::init_parameters (Param_Test_ptr objref, CORBA::Environment &env) { Generator *gen = GENERATOR::instance (); // value generator - // CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 3); - CORBA::ULong index = 2; + CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 3); switch (index) { @@ -120,8 +119,7 @@ int Test_Any::reset_parameters (void) { Generator *gen = GENERATOR::instance (); // value generator - // CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 2); - CORBA::ULong index = 2; + CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 3); switch (index) { @@ -172,20 +170,28 @@ Test_Any::add_args (CORBA::NVList_ptr param_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); + CORBA::Any in_arg (CORBA::_tc_any, + &this->in_, + CORBA::B_FALSE); + + CORBA::Any inout_arg (CORBA::_tc_any, + &this->inout_, + CORBA::B_FALSE); + + CORBA::Any out_arg (CORBA::_tc_any, + &this->out_.inout (), + CORBA::B_FALSE); // 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); + param_list->add_value ("o1", in_arg, CORBA::ARG_IN, env); + param_list->add_value ("o2", inout_arg, CORBA::ARG_INOUT, env); + 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); + retval->item (0, env)->value ()->replace (CORBA::_tc_any, + &this->ret_.inout (), + CORBA::B_FALSE, // does not own + env); return 0; } @@ -246,13 +252,7 @@ Test_Any::check_validity (void) CORBA::Boolean Test_Any::check_validity (CORBA::Request_ptr req) { - CORBA::Environment env; - - CORBA::Any_ptr out = this->out_; - CORBA::Any_ptr ret = this->out_; - *req->arguments ()->item (2, env)->value () >>= *out; - *req->result ()->value () >>= *ret; - + ACE_UNUSED_ARG (req); return this->check_validity (); } @@ -260,4 +260,3 @@ void Test_Any::print_values (void) { } - diff --git a/TAO/tests/Param_Test/any.h b/TAO/tests/Param_Test/any.h index 21c61e6bb8d..ad5a00f59fc 100644 --- a/TAO/tests/Param_Test/any.h +++ b/TAO/tests/Param_Test/any.h @@ -19,6 +19,7 @@ #if !defined (PARAM_TEST_ANY_H) #define PARAM_TEST_ANY_H +#include "helper.h" #include "param_testC.h" // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* diff --git a/TAO/tests/Param_Test/fixed_array.cpp b/TAO/tests/Param_Test/fixed_array.cpp index 005f400ab69..54c3d3fa91e 100644 --- a/TAO/tests/Param_Test/fixed_array.cpp +++ b/TAO/tests/Param_Test/fixed_array.cpp @@ -16,8 +16,6 @@ // // ============================================================================ -#include "helper.h" - #include "fixed_array.h" ACE_RCSID(Param_Test, fixed_array, "$Id$") @@ -27,7 +25,8 @@ ACE_RCSID(Param_Test, fixed_array, "$Id$") // ************************************************************************ Test_Fixed_Array::Test_Fixed_Array (void) - : opname_ (CORBA::string_dup ("test_fixed_array")) + : opname_ (CORBA::string_dup ("test_fixed_array")), + ret_ (new Param_Test::Fixed_Array) { } @@ -71,6 +70,8 @@ Test_Fixed_Array::reset_parameters (void) } // free the return value array Param_Test::Fixed_Array_free (this->ret_._retn ()); + // needed for repeated DII calls + this->ret_ = new Param_Test::Fixed_Array; return 0; } @@ -111,42 +112,28 @@ Test_Fixed_Array::add_args (CORBA::NVList_ptr param_list, // add return value type retval->item (0, env)->value ()->replace (Param_Test::_tc_Fixed_Array, - this->dii_ret_, + this->ret_.inout (), CORBA::B_FALSE, // does not own env); return 0; } CORBA::Boolean -Test_Fixed_Array::check_validity (CORBA::Request_ptr req) -{ - return this->check_validity_engine (this->in_, - this->inout_, - this->out_, - this->dii_ret_); -} - -CORBA::Boolean Test_Fixed_Array::check_validity (void) { - return check_validity_engine (this->in_, - this->inout_, - this->out_, - this->ret_.in ()); + if (this->compare (this->in_, this->inout_) && + this->compare (this->in_, this->out_) && + this->compare (this->in_, this->ret_.in ())) + return 1; + else + return 0; } CORBA::Boolean -Test_Fixed_Array::check_validity_engine (const Param_Test::Fixed_Array the_in, - const Param_Test::Fixed_Array the_inout, - const Param_Test::Fixed_Array the_out, - const Param_Test::Fixed_Array the_ret) +Test_Fixed_Array::check_validity (CORBA::Request_ptr req) { - if (this->compare (the_in, the_inout) && - this->compare (the_in, the_out) && - this->compare (the_in, the_ret)) - return 1; - else - return 0; + ACE_UNUSED_ARG (req); + return this->check_validity (); } CORBA::Boolean diff --git a/TAO/tests/Param_Test/fixed_array.h b/TAO/tests/Param_Test/fixed_array.h index 83a2736ef9c..22ef32dfdee 100644 --- a/TAO/tests/Param_Test/fixed_array.h +++ b/TAO/tests/Param_Test/fixed_array.h @@ -19,6 +19,7 @@ #if !defined (PARAM_TEST_FIXED_ARRAY_H) #define PARAM_TEST_FIXED_ARRAY_H +#include "helper.h" #include "param_testC.h" // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* @@ -62,12 +63,6 @@ public: // print all the values private: - // engine function called by the 2 versions of check_validity above - CORBA::Boolean check_validity_engine (const Param_Test::Fixed_Array the_in, - const Param_Test::Fixed_Array the_inout, - const Param_Test::Fixed_Array the_out, - const Param_Test::Fixed_Array the_ret); - CORBA::Boolean compare (const Param_Test::Fixed_Array_slice *a1, const Param_Test::Fixed_Array_slice *a2); // compare arrays @@ -89,9 +84,6 @@ private: Param_Test::Fixed_Array_var ret_; // return value - - Param_Test::Fixed_Array dii_ret_; - // DII return value }; #endif /* PARAM_TEST_FIXED_ARRAY_H */ diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp index 69be58fdc3b..f1ce9ed7324 100644 --- a/TAO/tests/Param_Test/nested_struct.cpp +++ b/TAO/tests/Param_Test/nested_struct.cpp @@ -16,8 +16,6 @@ // // ============================================================================ -#include "helper.h" - #include "nested_struct.h" ACE_RCSID(Param_Test, nested_struct, "$Id$") @@ -29,8 +27,8 @@ ACE_RCSID(Param_Test, nested_struct, "$Id$") Test_Nested_Struct::Test_Nested_Struct (void) : opname_ (CORBA::string_dup ("test_nested_struct")), inout_ (new Param_Test::Nested_Struct), - out_ (0), - ret_ (0) + out_ (new Param_Test::Nested_Struct), + ret_ (new Param_Test::Nested_Struct) { } @@ -76,9 +74,9 @@ Test_Nested_Struct::init_parameters (Param_Test_ptr objref, int Test_Nested_Struct::reset_parameters (void) { - this->inout_ = new Param_Test::Nested_Struct; // delete the previous one - this->out_ = 0; - this->ret_ = 0; + this->inout_ = new Param_Test::Nested_Struct; // delete the previous ones + this->out_ = new Param_Test::Nested_Struct; + this->ret_ = new Param_Test::Nested_Struct; return 0; } @@ -108,7 +106,7 @@ Test_Nested_Struct::add_args (CORBA::NVList_ptr param_list, CORBA::B_FALSE); CORBA::Any out_arg (Param_Test::_tc_Nested_Struct, - 0,//this->dii_out_, + &this->out_.inout (), // .out () causes crash CORBA::B_FALSE); // add parameters @@ -118,30 +116,27 @@ Test_Nested_Struct::add_args (CORBA::NVList_ptr param_list, // add return value retval->item (0, env)->value ()->replace (Param_Test::_tc_Nested_Struct, - 0,//this->dii_ret_, + &this->ret_.inout (), // see above CORBA::B_FALSE, // does not own env); return 0; } CORBA::Boolean -Test_Nested_Struct::check_validity_engine (Param_Test::Nested_Struct the_in, - Param_Test::Nested_Struct the_inout, - Param_Test::Nested_Struct the_out, - Param_Test::Nested_Struct the_ret) +Test_Nested_Struct::check_validity (void) { CORBA::Boolean flag = 0; - if ((the_in.vs.seq.length () == the_inout.vs.seq.length ()) && - (the_in.vs.seq.length () == the_out.vs.seq.length ()) && - (the_in.vs.seq.length () == the_ret.vs.seq.length ())) + if ((this->in_.vs.seq.length () == this->inout_->vs.seq.length ()) && + (this->in_.vs.seq.length () == this->out_->vs.seq.length ()) && + (this->in_.vs.seq.length () == this->ret_->vs.seq.length ())) { flag = 1; // assume all are equal // lengths are same. Now compare the contents - for (CORBA::ULong i=0; i < the_in.vs.seq.length () && flag; i++) + for (CORBA::ULong i=0; i < this->in_.vs.seq.length () && flag; i++) { - if (ACE_OS::strcmp (the_in.vs.seq[i], the_inout.vs.seq[i]) || - ACE_OS::strcmp (the_in.vs.seq[i], the_out.vs.seq[i]) || - ACE_OS::strcmp (the_in.vs.seq[i], the_ret.vs.seq[i])) + if (ACE_OS::strcmp (this->in_.vs.seq[i], this->inout_->vs.seq[i]) || + ACE_OS::strcmp (this->in_.vs.seq[i], this->out_->vs.seq[i]) || + ACE_OS::strcmp (this->in_.vs.seq[i], this->ret_->vs.seq[i])) // not equal flag = 0; } @@ -150,27 +145,10 @@ Test_Nested_Struct::check_validity_engine (Param_Test::Nested_Struct the_in, } CORBA::Boolean -Test_Nested_Struct::check_validity (void) -{ - return check_validity_engine (this->in_, - this->inout_.in (), - this->out_.in (), - this->ret_.in ()); -} - -CORBA::Boolean Test_Nested_Struct::check_validity (CORBA::Request_ptr req) { - - CORBA::Environment env; - - *req->arguments ()->item (2, env)->value () >>= this->dii_out_; - *req->result ()->value () >>= this->dii_ret_; - - return this->check_validity_engine (this->in_, - this->inout_.in (), - *this->dii_out_, - *this->dii_ret_); + ACE_UNUSED_ARG (req); + return this->check_validity (); } void diff --git a/TAO/tests/Param_Test/nested_struct.h b/TAO/tests/Param_Test/nested_struct.h index da8cd3b5d63..9561adcb8a3 100644 --- a/TAO/tests/Param_Test/nested_struct.h +++ b/TAO/tests/Param_Test/nested_struct.h @@ -19,6 +19,7 @@ #if !defined (PARAM_TEST_NESTED_STRUCT_H) #define PARAM_TEST_NESTED_STRUCT_H +#include "helper.h" #include "param_testC.h" // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* @@ -63,12 +64,6 @@ public: // print all the values private: - // private utility called by the 2 versions of check_validity () above - CORBA::Boolean check_validity_engine (Param_Test::Nested_Struct the_in, - Param_Test::Nested_Struct the_inout, - Param_Test::Nested_Struct the_out, - Param_Test::Nested_Struct the_ret); - char *opname_; // operation name @@ -84,12 +79,6 @@ private: Param_Test::Nested_Struct_var ret_; // return value - - Param_Test::Nested_Struct *dii_out_; - // DII out parameter - - Param_Test::Nested_Struct *dii_ret_; - // DII return value }; #endif /* PARAM_TEST_NESTED_STRUCT_H */ diff --git a/TAO/tests/Param_Test/var_array.cpp b/TAO/tests/Param_Test/var_array.cpp index 1f829dcc359..c56e7cdea2b 100644 --- a/TAO/tests/Param_Test/var_array.cpp +++ b/TAO/tests/Param_Test/var_array.cpp @@ -16,8 +16,6 @@ // // ============================================================================ -#include "helper.h" - #include "var_array.h" ACE_RCSID(Param_Test, var_array, "$Id$") @@ -27,7 +25,9 @@ ACE_RCSID(Param_Test, var_array, "$Id$") // ************************************************************************ Test_Var_Array::Test_Var_Array (void) - : opname_ (CORBA::string_dup ("test_var_array")) + : opname_ (CORBA::string_dup ("test_var_array")), + out_ (new Param_Test::Var_Array), + ret_ (new Param_Test::Var_Array) { } @@ -67,6 +67,8 @@ Test_Var_Array::reset_parameters (void) // free the out, and return value arrays Param_Test::Var_Array_free (this->out_._retn ()); Param_Test::Var_Array_free (this->ret_._retn ()); + this->out_ = new Param_Test::Var_Array; + this->ret_ = new Param_Test::Var_Array; return 0; } @@ -98,7 +100,7 @@ Test_Var_Array::add_args (CORBA::NVList_ptr param_list, CORBA::B_FALSE); CORBA::Any out_arg (Param_Test::_tc_Var_Array, - this->dii_out_, + this->out_, CORBA::B_FALSE); // add parameters @@ -108,7 +110,7 @@ Test_Var_Array::add_args (CORBA::NVList_ptr param_list, // add return value type retval->item (0, env)->value ()->replace (Param_Test::_tc_Var_Array, - this->dii_ret_, + this->ret_, CORBA::B_FALSE, // does not own env); return 0; @@ -117,38 +119,24 @@ Test_Var_Array::add_args (CORBA::NVList_ptr param_list, CORBA::Boolean Test_Var_Array::check_validity (void) { - return this->check_validity_engine (this->in_, - this->inout_, - this->out_.in (), - this->ret_.in ()); + if (this->compare (this->in_, this->inout_) && + this->compare (this->in_, this->out_.in ()) && + this->compare (this->in_, this->ret_.in ())) + return 1; + else + return 0; } CORBA::Boolean Test_Var_Array::check_validity (CORBA::Request_ptr req) { - return this->check_validity_engine (this->in_, - this->inout_, - this->dii_out_, - this->dii_ret_); -} - -CORBA::Boolean -Test_Var_Array::check_validity_engine (const Param_Test::Var_Array the_in, - const Param_Test::Var_Array the_inout, - const Param_Test::Var_Array the_out, - const Param_Test::Var_Array the_ret) -{ - if (this->compare (the_in, the_inout) && - this->compare (the_in, the_out) && - this->compare (the_in, the_ret)) - return 1; - else - return 0; + ACE_UNUSED_ARG (req); + return this->check_validity (); } CORBA::Boolean Test_Var_Array::compare (const Param_Test::Var_Array_slice *a1, - const Param_Test::Var_Array_slice *a2) + const Param_Test::Var_Array_slice *a2) { for (CORBA::ULong i=0; i < Param_Test::DIM2; i++) { diff --git a/TAO/tests/Param_Test/var_array.h b/TAO/tests/Param_Test/var_array.h index 34bceb174f2..dff43d0d15e 100644 --- a/TAO/tests/Param_Test/var_array.h +++ b/TAO/tests/Param_Test/var_array.h @@ -19,6 +19,7 @@ #if !defined (PARAM_TEST_VAR_ARRAY_H) #define PARAM_TEST_VAR_ARRAY_H +#include "helper.h" #include "param_testC.h" // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* @@ -62,12 +63,6 @@ public: // print all the values private: - // engine function called by the 2 versions of check_validity above - CORBA::Boolean check_validity_engine (const Param_Test::Var_Array the_in, - const Param_Test::Var_Array the_inout, - const Param_Test::Var_Array the_out, - const Param_Test::Var_Array the_ret); - CORBA::Boolean compare (const Param_Test::Var_Array_slice *a1, const Param_Test::Var_Array_slice *a2); // compare arrays @@ -89,12 +84,6 @@ private: Param_Test::Var_Array_var ret_; // return value - - Param_Test::Var_Array dii_out_; - // DII out parameter - - Param_Test::Var_Array dii_ret_; - // DII return value }; #endif /* PARAM_TEST_VAR_ARRAY_H */ diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp index 5459efcb7a6..a70184391cf 100644 --- a/TAO/tests/Param_Test/var_struct.cpp +++ b/TAO/tests/Param_Test/var_struct.cpp @@ -16,8 +16,6 @@ // // ============================================================================ -#include "helper.h" - #include "var_struct.h" ACE_RCSID(Param_Test, var_struct, "$Id$") @@ -29,8 +27,8 @@ ACE_RCSID(Param_Test, var_struct, "$Id$") Test_Var_Struct::Test_Var_Struct (void) : opname_ (CORBA::string_dup ("test_var_struct")), inout_ (new Param_Test::Var_Struct), - out_ (0), - ret_ (0) + out_ (new Param_Test::Var_Struct), + ret_ (new Param_Test::Var_Struct) { } @@ -78,9 +76,9 @@ Test_Var_Struct::init_parameters (Param_Test_ptr objref, int Test_Var_Struct::reset_parameters (void) { - this->inout_ = new Param_Test::Var_Struct; // delete the previous one - this->out_ = 0; - this->ret_ = 0; + this->inout_ = new Param_Test::Var_Struct; // delete the previous ones + this->out_ = new Param_Test::Var_Struct; + this->ret_ = new Param_Test::Var_Struct; return 0; } @@ -106,11 +104,11 @@ Test_Var_Struct::add_args (CORBA::NVList_ptr param_list, CORBA::B_FALSE); CORBA::Any inout_arg (Param_Test::_tc_Var_Struct, - &this->inout_.inout (), + &this->inout_.inout (), // .out () causes crash CORBA::B_FALSE); CORBA::Any out_arg (Param_Test::_tc_Var_Struct, - 0,//this->dii_out_, + &this->out_.inout (), CORBA::B_FALSE); // add parameters @@ -120,36 +118,34 @@ Test_Var_Struct::add_args (CORBA::NVList_ptr param_list, // add return value retval->item (0, env)->value ()->replace (Param_Test::_tc_Var_Struct, - 0,//this->dii_ret_, + &this->ret_.inout (), // see above CORBA::B_FALSE, // does not own env); return 0; } + CORBA::Boolean -Test_Var_Struct::check_validity_engine (Param_Test::Var_Struct the_in, - Param_Test::Var_Struct the_inout, - Param_Test::Var_Struct the_out, - Param_Test::Var_Struct the_ret) +Test_Var_Struct::check_validity (void) { CORBA::Boolean flag = 0; - if ((!ACE_OS::strcmp (the_in.dummy1, the_inout.dummy1)) && - (!ACE_OS::strcmp (the_in.dummy1, the_out.dummy1)) && - (!ACE_OS::strcmp (the_in.dummy1, the_ret.dummy1)) && - (!ACE_OS::strcmp (the_in.dummy2, the_inout.dummy2)) && - (!ACE_OS::strcmp (the_in.dummy2, the_out.dummy2)) && - (!ACE_OS::strcmp (the_in.dummy2, the_ret.dummy2)) && - (the_in.seq.length () == the_inout.seq.length ()) && - (the_in.seq.length () == the_out.seq.length ()) && - (the_in.seq.length () == the_ret.seq.length ())) + if ((!ACE_OS::strcmp (this->in_.dummy1, this->inout_->dummy1)) && + (!ACE_OS::strcmp (this->in_.dummy1, this->out_->dummy1)) && + (!ACE_OS::strcmp (this->in_.dummy1, this->ret_->dummy1)) && + (!ACE_OS::strcmp (this->in_.dummy2, this->inout_->dummy2)) && + (!ACE_OS::strcmp (this->in_.dummy2, this->out_->dummy2)) && + (!ACE_OS::strcmp (this->in_.dummy2, this->ret_->dummy2)) && + (this->in_.seq.length () == this->inout_->seq.length ()) && + (this->in_.seq.length () == this->out_->seq.length ()) && + (this->in_.seq.length () == this->ret_->seq.length ())) { flag = 1; // assume all are equal // lengths are same. Now compare the contents - for (CORBA::ULong i=0; i < the_in.seq.length () && flag; i++) + for (CORBA::ULong i=0; i < this->in_.seq.length () && flag; i++) { - if (ACE_OS::strcmp (the_in.seq[i], the_inout.seq[i]) || - ACE_OS::strcmp (the_in.seq[i], the_out.seq[i]) || - ACE_OS::strcmp (the_in.seq[i], the_ret.seq[i])) + if (ACE_OS::strcmp (this->in_.seq[i], this->inout_->seq[i]) || + ACE_OS::strcmp (this->in_.seq[i], this->out_->seq[i]) || + ACE_OS::strcmp (this->in_.seq[i], this->ret_->seq[i])) // not equal flag = 0; } @@ -158,26 +154,10 @@ Test_Var_Struct::check_validity_engine (Param_Test::Var_Struct the_in, } CORBA::Boolean -Test_Var_Struct::check_validity (void) -{ - return check_validity_engine (this->in_, - this->inout_.in (), - this->out_.in (), - this->ret_.in ()); -} - -CORBA::Boolean Test_Var_Struct::check_validity (CORBA::Request_ptr req) { - CORBA::Environment env; - - *req->arguments ()->item (2, env)->value () >>= this->dii_out_; - *req->result ()->value () >>= this->dii_ret_; - - return this->check_validity_engine (this->in_, - this->inout_.in (), - *this->dii_out_, - *this->dii_ret_); + ACE_UNUSED_ARG (req); + return this->check_validity (); } void diff --git a/TAO/tests/Param_Test/var_struct.h b/TAO/tests/Param_Test/var_struct.h index 2a8cfcb3b24..31fe2b810b4 100644 --- a/TAO/tests/Param_Test/var_struct.h +++ b/TAO/tests/Param_Test/var_struct.h @@ -19,6 +19,7 @@ #if !defined (PARAM_TEST_VAR_STRUCT_H) #define PARAM_TEST_VAR_STRUCT_H +#include "helper.h" #include "param_testC.h" // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* @@ -62,12 +63,6 @@ public: // print all the values private: - // private utility called by the 2 versions of check_validity () above - CORBA::Boolean check_validity_engine (Param_Test::Var_Struct the_in, - Param_Test::Var_Struct the_inout, - Param_Test::Var_Struct the_out, - Param_Test::Var_Struct the_ret); - char *opname_; // operation name @@ -83,12 +78,6 @@ private: Param_Test::Var_Struct_var ret_; // return value - - Param_Test::Var_Struct *dii_out_; - // DII out parameter - - Param_Test::Var_Struct *dii_ret_; - // DII return value }; #endif /* PARAM_TEST_VAR_STRUCT_H */ |