diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2006-07-03 11:11:28 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2006-07-03 11:11:28 +0000 |
commit | 0e6f9ad3d48643856b0d08cfd024e8661af6c202 (patch) | |
tree | 52bc40dd010276f6dfcb1693175f8fe60da3faa7 | |
parent | 8fff670ae31803948d41468886ada6b66c6aba65 (diff) | |
download | ATCD-0e6f9ad3d48643856b0d08cfd024e8661af6c202.tar.gz |
ChangeLog tag: Mon Jul 3 10:59:59 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 13 | ||||
-rw-r--r-- | TAO/tests/OBV/Any/OBV_Any.mpc | 1 | ||||
-rw-r--r-- | TAO/tests/OBV/Any/client.cpp | 64 | ||||
-rw-r--r-- | TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc | 1 | ||||
-rw-r--r-- | TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/OBV/Truncatable/client.cpp | 2 |
6 files changed, 53 insertions, 32 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a3efdccd7b7..3fc7f3f2e41 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,16 @@ +Mon Jul 3 10:59:59 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com> + + * tests/OBV/Any/OBV_Any.mpc: + * tests/OBV/Any/client.cpp: + + * tests/OBV/Truncatable/OBV_Truncatable.mpc: + * tests/OBV/Truncatable/TruncatableS_impl.cpp: + * tests/OBV/Truncatable/client.cpp: + + Bug 2576 turned out to be invalid. There is already a mechanism + present to address the problem I raised. I've updated the tests + to work with the correct value extraction methods. + Mon Jul 3 12:00:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl> * tests/IDL_Test/Bug_2577_Regression.idl: diff --git a/TAO/tests/OBV/Any/OBV_Any.mpc b/TAO/tests/OBV/Any/OBV_Any.mpc index 955d02be791..62083fb37f5 100644 --- a/TAO/tests/OBV/Any/OBV_Any.mpc +++ b/TAO/tests/OBV/Any/OBV_Any.mpc @@ -11,7 +11,6 @@ project(*Server): taoexe, portableserver, valuetype { project(*Client): taoexe, valuetype { after += *Server Source_Files { -// buildflags += TAO_TEST_BUG_2576 AnyC.cpp client.cpp } diff --git a/TAO/tests/OBV/Any/client.cpp b/TAO/tests/OBV/Any/client.cpp index 188250651b2..ac95c144390 100644 --- a/TAO/tests/OBV/Any/client.cpp +++ b/TAO/tests/OBV/Any/client.cpp @@ -73,24 +73,6 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; vb_factory->_remove_ref (); // release ownership - // Obtain reference to the object - - CORBA::Object_var tmp = - orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - OBV_AnyTest::Test_var test = - OBV_AnyTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (test.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil OBV_AnyTest::Test reference <%s>\n", - ior), - 1); - } - // Do local test OBV_AnyTest::VA_var va1, va2; @@ -126,24 +108,48 @@ main (int argc, char *argv[]) 1); } -#if defined (TAO_TEST_BUG_2576) + // It should be possible to extract to a base type OBV_AnyTest::VB_var vb1; ACE_NEW_RETURN (vb1.inout (), OBV_OBV_AnyTest::VB, 1); vb1->id (magic); a1 <<= vb1.in (); - - if (!(a1 >>= dst) || dst->id() != magic) + CORBA::ValueBase_var target; + if (!(a1 >>= CORBA::Any::to_value(target.inout()))) { ACE_ERROR_RETURN ((LM_DEBUG, "(%P|%t) client - base extraction test failed.\n"), 1); } -#endif /* TAO_TEST_BUG_2576 */ + dst = OBV_AnyTest::VA::_downcast(target._retn()); + if (dst == 0 || dst->id() != magic) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "(%P|%t) client - base extraction test failed.\n"), + 1); + } + // Now do remote test + CORBA::Object_var tmp = + orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + OBV_AnyTest::Test_var test = + OBV_AnyTest::Test::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (test.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil OBV_AnyTest::Test reference <%s>\n", + ior), + 1); + } + + // STEP 1. CORBA::Any_var result = test->get_something ( 0 @@ -181,22 +187,26 @@ main (int argc, char *argv[]) 1); } -#if defined (TAO_TEST_BUG_2576) // STEP 4. get a VB, but extract to a VA*. - OBV_AnyTest::VA* dst_va = test->get_vb(); - result = test->get_something ( 1 ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - if (!(result.inout () >>= dst_va) || dst_va->id () != magic) + if (!(result.inout () >>= CORBA::Any::to_value(target.inout()))) { ACE_ERROR_RETURN ((LM_DEBUG, "(%P|%t) client - test 4 failed.\n"), 1); } -#endif /* TAO_TEST_BUG_2576 */ + dst_va = OBV_AnyTest::VA::_downcast(target._retn()); + if (dst_va == 0 || dst_va->id() != magic) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "(%P|%t) client - test 4 failed.\n"), + 1); + } + test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc b/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc index 977d42cd9ab..1dbf29bc7f6 100644 --- a/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc +++ b/TAO/tests/OBV/Truncatable/OBV_Truncatable.mpc @@ -11,7 +11,6 @@ project(*Server): taoexe, portableserver, valuetype { project(*Client): taoexe, valuetype { after += *Server Source_Files { -// buildflags += -DTAO_TEST_BUG_2576 ExtraC.cpp TruncatableC.cpp client.cpp diff --git a/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp b/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp index 7352ad73d17..43601e5c165 100644 --- a/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp +++ b/TAO/tests/OBV/Truncatable/TruncatableS_impl.cpp @@ -170,7 +170,8 @@ Test_impl::op5 (const CORBA::Any& val, { ov = new ::OBV_OBV_TruncatableTest::TValue1(); ::OBV_TruncatableTest::TValue1 *iv = 0; - if (!(val >>= iv)) + CORBA::ValueBase_var target; + if (!(val >>= CORBA::Any::to_value(target.inout()))) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%P|%t)Test_impl::op5 extract failed\n"))); @@ -179,6 +180,7 @@ Test_impl::op5 (const CORBA::Any& val, } else { + iv = ::OBV_TruncatableTest::TValue1::_downcast(target._retn()); if (TAO_debug_level > 0) ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t)Test_impl::op5") diff --git a/TAO/tests/OBV/Truncatable/client.cpp b/TAO/tests/OBV/Truncatable/client.cpp index 07e25701e5d..c372ce85579 100644 --- a/TAO/tests/OBV/Truncatable/client.cpp +++ b/TAO/tests/OBV/Truncatable/client.cpp @@ -483,7 +483,6 @@ main (int argc, char *argv[]) ACE_TEXT ("passed") : ACE_TEXT ("failed"))); } -#if defined (TAO_TEST_BUG_2576) { OBV_OBV_TruncatableTest::Extra1 v1; v1.basic_data (9); @@ -513,7 +512,6 @@ main (int argc, char *argv[]) (pretest == fail) ? ACE_TEXT ("passed") : ACE_TEXT ("failed"))); } -#endif /* TAO_TEST_BUG_2576 */ ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - shutdown orb \n")); |