diff options
Diffstat (limited to 'TAO/tests/Collocation')
-rw-r--r-- | TAO/tests/Collocation/Collocation.cpp | 7 | ||||
-rw-r--r-- | TAO/tests/Collocation/Collocation_Tester.cpp | 47 | ||||
-rw-r--r-- | TAO/tests/Collocation/Collocation_Tester.h | 6 | ||||
-rw-r--r-- | TAO/tests/Collocation/Diamond_i.cpp | 20 | ||||
-rw-r--r-- | TAO/tests/Collocation/Diamond_i.h | 20 |
5 files changed, 37 insertions, 63 deletions
diff --git a/TAO/tests/Collocation/Collocation.cpp b/TAO/tests/Collocation/Collocation.cpp index 19bd6433a70..a075b5c6965 100644 --- a/TAO/tests/Collocation/Collocation.cpp +++ b/TAO/tests/Collocation/Collocation.cpp @@ -12,13 +12,10 @@ int main (int argc, char *argv[]) Collocation_Test coll_test; coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + coll_test.run (); - coll_test.shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + coll_test.shutdown (); } ACE_CATCHANY { diff --git a/TAO/tests/Collocation/Collocation_Tester.cpp b/TAO/tests/Collocation/Collocation_Tester.cpp index 87fba9ceb92..ce1cbb86569 100644 --- a/TAO/tests/Collocation/Collocation_Tester.cpp +++ b/TAO/tests/Collocation/Collocation_Tester.cpp @@ -21,12 +21,10 @@ Collocation_Test::Collocation_Test (void) } void -Collocation_Test::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::shutdown (void) { this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->orb_->destroy (); } int @@ -34,7 +32,6 @@ Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) { // Initialize the ORB. this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); int result = this->parse_args (argc, argv); if (result != 0) @@ -43,52 +40,42 @@ Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) // Get an Object reference to RootPOA. CORBA::Object_var obj = this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Narrow the Object reference to a POA reference this->root_poa_ = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Get the POAManager of RootPOA this->poa_manager_ = - this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->the_POAManager (); // Activate the diamond servant and its base classes under RootPOA. PortableServer::ObjectId_var id = this->root_poa_->activate_object (&this->top_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // // We only care about the most derived class here. -// this->diamond_obj_ = this->diamond_servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER); -// ACE_CHECK_RETURN (-1); +// this->diamond_obj_ = this->diamond_servant_._this (); id = this->root_poa_->activate_object (&this->diamond_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // We only care about the most derived class here. this->diamond_obj_ = this->root_poa_->id_to_reference (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); id = this->root_poa_->activate_object (&this->left_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); id = this->root_poa_->activate_object (&this->right_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); CORBA::String_var str = this->orb_->object_to_string (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n", str.in())); @@ -106,51 +93,41 @@ Collocation_Test::parse_args (int /*argc*/, } int -Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::test_narrow (void) { Diamond::Top_var top = Diamond::Top::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Left_var left = Diamond::Left::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Right_var right = Diamond::Right::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Buttom_var buttom = Diamond::Buttom::_narrow (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - CORBA::String_var str = top->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + CORBA::String_var str = top->shape (); ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ())); - str = left->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = left->shape (); ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ())); - str = right->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = right->shape (); ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ())); - str = buttom->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = buttom->shape (); ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ())); return 0; } int -Collocation_Test::run (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::run (void) { - this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->poa_manager_->activate (); - this->test_narrow (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->test_narrow (); return 0; } diff --git a/TAO/tests/Collocation/Collocation_Tester.h b/TAO/tests/Collocation/Collocation_Tester.h index 131e18003dd..fa8a0f690bf 100644 --- a/TAO/tests/Collocation/Collocation_Tester.h +++ b/TAO/tests/Collocation/Collocation_Tester.h @@ -29,7 +29,7 @@ class Collocation_Test public: Collocation_Test (void); - void shutdown (ACE_ENV_SINGLE_ARG_DECL); + void shutdown (void); int init (int argc, char *argv[] ACE_ENV_ARG_DECL_NOT_USED); // Initializing the Collocation_Test object. @@ -37,11 +37,11 @@ public: int parse_args (int argc, char *argv[]); // Parse the test specific arguments. - int test_narrow (ACE_ENV_SINGLE_ARG_DECL_NOT_USED); + int test_narrow (void); // This test narrow an object reference to its base class and see // if it works correctly. - int run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED); + int run (void); // Run the test. private: diff --git a/TAO/tests/Collocation/Diamond_i.cpp b/TAO/tests/Collocation/Diamond_i.cpp index f94a35d2c4b..1aed52ccf2f 100644 --- a/TAO/tests/Collocation/Diamond_i.cpp +++ b/TAO/tests/Collocation/Diamond_i.cpp @@ -13,7 +13,7 @@ Top_i::~Top_i () } char * -Top_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Top_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -32,7 +32,7 @@ Left_i::~Left_i () } char * -Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Left_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -41,7 +41,7 @@ Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Left_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Left_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -60,7 +60,7 @@ Right_i::~Right_i () } char * -Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -69,7 +69,7 @@ Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -79,7 +79,7 @@ Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } CORBA::Long -Right_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::width (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -98,7 +98,7 @@ Buttom_i::~Buttom_i () } char * -Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -107,7 +107,7 @@ Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -116,7 +116,7 @@ Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } CORBA::Long -Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::width (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -125,7 +125,7 @@ Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Buttom_i::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::name (void) ACE_THROW_SPEC (( CORBA::SystemException )) diff --git a/TAO/tests/Collocation/Diamond_i.h b/TAO/tests/Collocation/Diamond_i.h index 9e248a81dbd..e57cf1a6468 100644 --- a/TAO/tests/Collocation/Diamond_i.h +++ b/TAO/tests/Collocation/Diamond_i.h @@ -17,7 +17,7 @@ public: ~Top_i (void); // Ctor and dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) }; @@ -29,11 +29,11 @@ public: ~Left_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) }; @@ -45,15 +45,15 @@ public: ~Right_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) - virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long width (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the width of the stuff. }; @@ -65,19 +65,19 @@ public: ~Buttom_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) - virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long width (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the width of the stuff. - virtual char * name (ACE_ENV_SINGLE_ARG_DECL) + virtual char * name (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the name of the object. }; |