diff options
Diffstat (limited to 'TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp')
-rw-r--r-- | TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp | 92 |
1 files changed, 36 insertions, 56 deletions
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp index 77c4257f203..a6144215762 100644 --- a/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp +++ b/TAO/tests/DII_Collocation_Tests/oneway/Hello.cpp @@ -35,7 +35,6 @@ Test_Simple_Test_i::~Test_Simple_Test_i (void) void Test_Simple_Test_i::test_method ( ::CORBA::ULong & error_count - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -52,10 +51,9 @@ Hello::Hello (CORBA::ORB_ptr orb, { } -void +void Hello::test_basic_arg ( ::CORBA::Long basic - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -65,14 +63,13 @@ Hello::test_basic_arg ( ERROR_COUNT ("Hello::test_basic_arg") } -void -Hello::test_unbounded_string_arg(const char* message - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_unbounded_string_arg(const char* message) ACE_THROW_SPEC((CORBA::SystemException)) { if (debug) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_unbounded_string_arg ") - ACE_TEXT("got unbounded string: %s\n"), + ACE_TEXT("got unbounded string: %s\n"), message)); if (ACE_OS::strncmp (message, TEST_STR, strlen (TEST_STR) != 0)) { @@ -81,14 +78,13 @@ Hello::test_unbounded_string_arg(const char* message } -void -Hello::test_bounded_string_arg(const char* message - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_bounded_string_arg(const char* message) ACE_THROW_SPEC((CORBA::SystemException)) { if (debug) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_bounded_string_arg ") - ACE_TEXT("got bounded string: %s\n"), + ACE_TEXT("got bounded string: %s\n"), message)); if (ACE_OS::strncmp (message, TEST_STR, ::Test::BOUNDED_STRING_SIZE) != 0) { @@ -97,16 +93,15 @@ Hello::test_bounded_string_arg(const char* message } -void -Hello::test_fixed_array_arg(const ::Test::Fixed_Array message - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_fixed_array_arg(const ::Test::Fixed_Array message) ACE_THROW_SPEC((CORBA::SystemException)) { for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++) { if (debug) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_fixed_array_arg ") - ACE_TEXT("got fixed array: %d\n"), + ACE_TEXT("got fixed array: %d\n"), message[i])); if (message[i] != static_cast<CORBA::Long> (i + 999)) ERROR_COUNT ("Hello::test_fixed_array_arg") @@ -114,9 +109,8 @@ Hello::test_fixed_array_arg(const ::Test::Fixed_Array message } -void -Hello::test_bounded_var_size_arg(const ::Test::Bounded_Var_Size_Arg& message - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_bounded_var_size_arg(const ::Test::Bounded_Var_Size_Arg& message) ACE_THROW_SPEC((CORBA::SystemException)) { if (debug) @@ -127,9 +121,8 @@ Hello::test_bounded_var_size_arg(const ::Test::Bounded_Var_Size_Arg& message } -void -Hello::test_unbounded_var_size_arg(const ::Test::Unbounded_Var_Size_Arg& message - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_unbounded_var_size_arg(const ::Test::Unbounded_Var_Size_Arg& message) ACE_THROW_SPEC((CORBA::SystemException)) { if (debug) @@ -140,9 +133,8 @@ Hello::test_unbounded_var_size_arg(const ::Test::Unbounded_Var_Size_Arg& message } -void -Hello::test_fixed_size_arg(const ::Test::TimeOfDay& t - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_fixed_size_arg(const ::Test::TimeOfDay& t) ACE_THROW_SPEC ((CORBA::SystemException)) { if (debug) @@ -150,16 +142,15 @@ Hello::test_fixed_size_arg(const ::Test::TimeOfDay& t ACE_TEXT("got timeofday: %d:%d:%d\n"), t.hour, t.minute, t.second)); - if (t.hour != TEST_HOUR - || t.minute != TEST_MINUTE + if (t.hour != TEST_HOUR + || t.minute != TEST_MINUTE || t.second != TEST_SECOND) ERROR_COUNT ("Hello::test_fixed_size_arg") } -void -Hello::test_var_array_arg(const Test::Var_Array messages - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_var_array_arg(const Test::Var_Array messages) ACE_THROW_SPEC((CORBA::SystemException)) { for (CORBA::ULong i = 0; i != ::Test::VAR_ARRAY_SIZE; i ++) @@ -173,9 +164,8 @@ Hello::test_var_array_arg(const Test::Var_Array messages } -void -Hello::test_special_basic_arg(CORBA::Char value - ACE_ENV_ARG_DECL_NOT_USED) +void +Hello::test_special_basic_arg(CORBA::Char value) ACE_THROW_SPEC((CORBA::SystemException)) { if (debug) @@ -188,7 +178,6 @@ Hello::test_special_basic_arg(CORBA::Char value void Hello::test_objref_arg ( ::Test::Simple_Test_ptr test - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -199,14 +188,13 @@ void Hello::test_objref_arg ( if (CORBA::is_nil (test)) ERROR_COUNT ("Hello::test_objref_arg") - else + else { // Increment the error_count before calling test_method() and decrement // the error_count when the server handling the test_method() call. CORBA::ULong error_count = 0; error_count ++; - test->test_method (error_count ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + test->test_method (error_count); if (error_count != 0) { ERROR_COUNT ("Hello::test_objref_arg") @@ -216,7 +204,6 @@ void Hello::test_objref_arg ( void Hello::test_object_arg ( ::CORBA::Object_ptr o - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -225,11 +212,10 @@ void Hello::test_object_arg ( if (debug) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_object_arg \n"))); ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (o); - + CORBA::ULong error_count = 0; error_count ++; - simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + simple_test->test_method (error_count); if (error_count != 0) { ERROR_COUNT ("Hello::test_object_arg") @@ -240,7 +226,6 @@ void Hello::test_args_1 ( ::CORBA::Object_ptr arg1, ::CORBA::Char arg2, ::Test::Simple_Test_ptr arg3 - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -249,14 +234,12 @@ void Hello::test_args_1 ( if (debug) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_1 \n"))); ::Test::Simple_Test_var simple_test = ::Test::Simple_Test::_narrow (arg1); - + CORBA::ULong error_count = 0; error_count ++; - simple_test->test_method (error_count ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + simple_test->test_method (error_count); error_count ++; - arg3->test_method (error_count ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + arg3->test_method (error_count); if (error_count != 0) { @@ -271,7 +254,6 @@ void Hello::test_args_2 ( const char * arg1, const ::Test::Fixed_Array arg2, const ::Test::TimeOfDay & arg3 - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -281,15 +263,15 @@ void Hello::test_args_2 ( ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Hello::test_args_2 \n"))); if (ACE_OS::strncmp (arg1, TEST_STR, strlen (TEST_STR)) != 0 ) ERROR_COUNT ("Hello::test_args_2") - + for (unsigned i = 0; i < ::Test::FIX_ARRAY_SIZE; i++) { if (arg2[i] != static_cast<CORBA::Long> (i + 999)) ERROR_COUNT ("Hello::test_args_2") } - if (arg3.hour != TEST_HOUR - || arg3.minute != TEST_MINUTE + if (arg3.hour != TEST_HOUR + || arg3.minute != TEST_MINUTE || arg3.second != TEST_SECOND) ERROR_COUNT ("Hello::test_args_2") } @@ -299,7 +281,6 @@ void Hello::test_args_3 ( const ::Test::Bounded_Var_Size_Arg & arg2, const ::Test::Unbounded_Var_Size_Arg & arg3, const ::Test::Var_Array arg4 - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -321,7 +302,7 @@ void Hello::test_args_3 ( } char * -Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Hello::get_string (void) ACE_THROW_SPEC ((CORBA::SystemException)) { if (debug) @@ -359,12 +340,11 @@ Hello::get_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) return CORBA::string_dup ("Hello there!"); } -char * +char * Hello::test_unbounded_string ( const char * s1, char *& s2, CORBA::String_out s3 - ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException @@ -380,14 +360,14 @@ Hello::test_unbounded_string ( } void -Hello::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Hello::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { // Give the client thread time to return from the collocated // call to this method before shutting down the ORB. We sleep // to avoid BAD_INV_ORDER exceptions on fast dual processor machines. ACE_OS::sleep (1); - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); + this->orb_->shutdown (0); } CORBA::ULong Hello::error_count () const |