diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-28 22:46:13 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-28 22:46:13 +0000 |
commit | 0110233c0f29603caa2d34ab3311b1b1b35e5961 (patch) | |
tree | 63811650be2b10d0ab9d995c1fff6f0f68d15065 /TAO/tests | |
parent | 563df992daeda872673a3923eac232869cab6932 (diff) | |
download | ATCD-0110233c0f29603caa2d34ab3311b1b1b35e5961.tar.gz |
Added ACE_CHECK macros to client.cpp and initialization of
out_ and ret_ members for test_big_union.
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/Param_Test/big_union.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/Param_Test/client.cpp | 54 |
2 files changed, 39 insertions, 17 deletions
diff --git a/TAO/tests/Param_Test/big_union.cpp b/TAO/tests/Param_Test/big_union.cpp index 7a2516d57fc..5a0f6fa75e9 100644 --- a/TAO/tests/Param_Test/big_union.cpp +++ b/TAO/tests/Param_Test/big_union.cpp @@ -198,6 +198,8 @@ Test_Big_Union::reset_parameters (void) } break; } + this->out_ = new Param_Test::Big_Union (this->in_); + this->ret_ = new Param_Test::Big_Union (this->in_); return 0; } diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp index fca02ab1d5c..e4f090486cb 100644 --- a/TAO/tests/Param_Test/client.cpp +++ b/TAO/tests/Param_Test/client.cpp @@ -64,11 +64,18 @@ Param_Test_Client<T>::run_sii_test (void) // Declare the Env ACE_DECLARE_NEW_CORBA_ENV; // Initialize parameters for the test. - if (this->test_object_->init_parameters (this->param_test_, ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) client.cpp - run_sii_test:" - "init_parameters failed for opname - %s", - opname), -1); + int check = this->test_object_->init_parameters (this->param_test_, + ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); + + if (check == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) client.cpp - run_sii_test:" + "init_parameters failed for opname - %s", + opname), + -1); + } // Make the calls in a loop. @@ -84,7 +91,8 @@ Param_Test_Client<T>::run_sii_test (void) this->results_.start_timer (); // make the call - this->test_object_->run_sii_test (this->param_test_, ACE_TRY_ENV); + this->test_object_->run_sii_test (this->param_test_, + ACE_TRY_ENV); ACE_TRY_CHECK; // stop the timer. @@ -164,11 +172,18 @@ Param_Test_Client<T>::run_dii_test (void) // Environment variable ACE_DECLARE_NEW_CORBA_ENV; // initialize parameters for the test - if (this->test_object_->init_parameters (this->param_test_, ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) client.cpp - run_dii_test:" - "init_parameters failed for opname - %s", - opname), -1); + int check = this->test_object_->init_parameters (this->param_test_, + ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); + + if (check == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) client.cpp - run_dii_test:" + "init_parameters failed for opname - %s", + opname), + -1); + } // Make the calls in a loop. for (CORBA::ULong i = 0; i < opt->loop_count (); i++) @@ -195,12 +210,13 @@ Param_Test_Client<T>::run_dii_test (void) { // add arguments and typecode for return valueto the NVList this->test_object_->add_args (nvlist, - retval.in (), - ACE_TRY_ENV); + retval.in (), + ACE_TRY_ENV); ACE_TRY_CHECK; CORBA::NamedValue_ptr result = - CORBA::NamedValue::_duplicate (retval->item (0, ACE_TRY_ENV)); + CORBA::NamedValue::_duplicate (retval->item (0, + ACE_TRY_ENV)); ACE_TRY_CHECK; this->param_test_->_create_request (CORBA_Context::_nil (), @@ -220,13 +236,16 @@ Param_Test_Client<T>::run_dii_test (void) ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n")); // Make the invocation, verify the result. - this->test_object_->dii_req_invoke (req, ACE_TRY_ENV); + this->test_object_->dii_req_invoke (req, + ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY { this->results_.error_count (this->results_.error_count () + 1); - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,opname); + + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + opname); goto loop_around; } ACE_ENDTRY; @@ -244,6 +263,7 @@ Param_Test_Client<T>::run_dii_test (void) "(%N:%l) client.cpp - " "Invalid results in run_dii_test in iteration %d\n", i)); + continue; } @@ -270,7 +290,7 @@ Param_Test_Client<T>::run_dii_test (void) "********** Finished running %s DII *********\n", opname)); } - return this->results_.error_count ()? -1:0; + return this->results_.error_count () ? -1 : 0; } |