diff options
author | msmit <msmit@remedy.nl> | 2010-10-05 13:41:08 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-10-05 13:41:08 +0000 |
commit | 82ab04971ad71f259e78d42c42e2fa7b03f92ac3 (patch) | |
tree | 6a6cfddf3bb73a0f0f19b7b5084fe21fca36a067 /CIAO/tests | |
parent | d1d2d4cf0ee13709b5a4ecb1827a46d0527bcef5 (diff) | |
download | ATCD-82ab04971ad71f259e78d42c42e2fa7b03f92ac3.tar.gz |
Tue Oct 5 13:44:32 UTC 2010 Marcel Smit <msmit@remedy.nl>
* ccm/Extension/CCM_ContainerInterceptor.idl:
Added priority
* ciao/Containers/Extension/Extension_Container.mpc:
Added PortableServer as base project.
* ciao/Containers/Extension/Interceptor_Registration_T.h:
* ciao/Containers/Extension/Interceptor_Registration_T.cpp:
Rename action.
* tests/CIF/Common/CIF_Common.cpp:
* tests/CIF/Navigation/client.cpp:
* tests/CIF/Receptacle/client.cpp:
Resolved valgrind errors.
Diffstat (limited to 'CIAO/tests')
-rw-r--r-- | CIAO/tests/CIF/Common/CIF_Common.cpp | 13 | ||||
-rw-r--r-- | CIAO/tests/CIF/Navigation/client.cpp | 42 | ||||
-rw-r--r-- | CIAO/tests/CIF/Receptacle/client.cpp | 11 |
3 files changed, 43 insertions, 23 deletions
diff --git a/CIAO/tests/CIF/Common/CIF_Common.cpp b/CIAO/tests/CIF/Common/CIF_Common.cpp index 267841c801b..5c8e0461b9a 100644 --- a/CIAO/tests/CIF/Common/CIF_Common.cpp +++ b/CIAO/tests/CIF/Common/CIF_Common.cpp @@ -11,6 +11,7 @@ CIF_Common::CIF_Common(void) CIF_Common::~CIF_Common(void) { + this->orb_->destroy (); } //============================================================ @@ -106,7 +107,7 @@ CIF_Common::init(int argc, ACE_TCHAR *argv[]) int ret = 0; this->orb_ = ::CORBA::ORB_init(argc, argv); - ::CIAO::Client_init(this->orb_); + ::CIAO::Client_init(this->orb_.in ()); if (this->parse_args(argc, argv) != 0) return 1; @@ -115,9 +116,11 @@ CIF_Common::init(int argc, ACE_TCHAR *argv[]) { // Resolving naming service ::CORBA::Object_var naming_context_object = - this->orb_->string_to_object(naming_); + this->orb_->string_to_object(this->naming_); if (::CORBA::is_nil(naming_context_object.in())) - return -1; + { + return 1; + } CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow(naming_context_object.in()); @@ -234,7 +237,7 @@ CIF_Common::test_provider_component() "Start test\n")); int ret = 0; ::CORBA::Object_var provider_cmp = this->provider_object_->_get_component(); - ::CIF::CIF_Provider_var provider_object = ::CIF::CIF_Provider::_narrow(provider_cmp); + ::CIF::CIF_Provider_var provider_object = ::CIF::CIF_Provider::_narrow(provider_cmp.in ()); if (::CORBA::is_nil(provider_cmp.in())) { @@ -288,7 +291,7 @@ CIF_Common::test_user_component() "Start test\n")); int ret = 0; ::CORBA::Object_var user_cmp = this->user_object_->_get_component(); - ::CIF::CIF_User_ptr user_object = ::CIF::CIF_User::_narrow(user_cmp); + ::CIF::CIF_User_var user_object = ::CIF::CIF_User::_narrow(user_cmp.in ()); if (::CORBA::is_nil(user_object)) { ACE_ERROR_RETURN((LM_ERROR, diff --git a/CIAO/tests/CIF/Navigation/client.cpp b/CIAO/tests/CIF/Navigation/client.cpp index 22787a13b18..1cf4a1a7ad5 100644 --- a/CIAO/tests/CIF/Navigation/client.cpp +++ b/CIAO/tests/CIF/Navigation/client.cpp @@ -13,8 +13,24 @@ test_provide_facet (::Components::Navigation_ptr nav) try { - nav->provide_facet ("provide_cif_foo"); - nav->provide_facet ("provide_cif_derived_foo"); + ::CORBA::Object_var prov_cif_foo = + nav->provide_facet ("provide_cif_foo"); + if (::CORBA::is_nil (prov_cif_foo.in ())) + { + ACE_ERROR ((LM_ERROR, "Navigation test_provide_facet - " + "Error: provide_facet with provide_cif_foo " + "returned a NIL pointer\n")); + return 1; + } + ::CORBA::Object_var prov_cif_der_foo = + nav->provide_facet ("provide_cif_derived_foo"); + if (::CORBA::is_nil (prov_cif_der_foo.in ())) + { + ACE_ERROR ((LM_ERROR, "Navigation test_provide_facet - " + "Error: provide_facet with provide_cif_derived_foo " + "returned a NIL pointer\n")); + return 1; + } } catch (const ::Components::InvalidName &) { @@ -120,7 +136,7 @@ test_get_named_facets (::Components::Navigation_ptr nav) "Start test\n")); try { - ::Components::NameList names; + ::Components::NameList_var names; names.length (2); names[0] = CORBA::string_dup ("provide_cif_foo"); names[1] = CORBA::string_dup ("provide_cif_derived_foo"); @@ -154,7 +170,7 @@ test_get_named_facets (::Components::Navigation_ptr nav) "InvalidName exception\n")); try { - ::Components::NameList names; + ::Components::NameList_var names; names.length (2); names[0] = CORBA::string_dup ("provide_cif_foo_invalid_name"); names[1] = CORBA::string_dup ("provide_cif_derived_foo_invalid_name"); @@ -402,7 +418,7 @@ test_get_named_publishers (::Components::CCMObject_ptr cmp) ::Components::PublisherDescriptions_var pds; try { - ::Components::NameList two_names; + ::Components::NameList_var two_names; two_names.length (2); two_names[0] = ::CORBA::string_dup ("publish_do_something"); two_names[1] = ::CORBA::string_dup ("publish_do_something_else"); @@ -435,7 +451,7 @@ test_get_named_publishers (::Components::CCMObject_ptr cmp) // Test InvalidName exception try { - ::Components::NameList invalid_names; + ::Components::NameList_var invalid_names; invalid_names.length (3); invalid_names[0] = ::CORBA::string_dup ("publish_do_something"); invalid_names[1] = ::CORBA::string_dup ("publish_do_something_invalid_name"); @@ -524,7 +540,7 @@ test_get_named_emitters (::Components::CCMObject_ptr cmp) try { - ::Components::NameList one_name; + ::Components::NameList_var one_name; one_name.length (1); one_name[0] = ::CORBA::string_dup ("emit_do_something"); eds = cmp->get_named_emitters (one_name); @@ -556,7 +572,7 @@ test_get_named_emitters (::Components::CCMObject_ptr cmp) // Test InvalidName exception try { - ::Components::NameList invalid_names; + ::Components::NameList_var invalid_names; invalid_names.length (2); invalid_names[0] = ::CORBA::string_dup ("emit_do_something"); invalid_names[1] = ::CORBA::string_dup ("emit_do_something_invalid_name"); @@ -641,11 +657,11 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) 1); } - ::CORBA::Object_var obj = cmd.get_provider_cmp (); - if (::CORBA::is_nil (obj.in ())) + ::CORBA::Object_var prov = cmd.get_provider_cmp (); + if (::CORBA::is_nil (prov.in ())) { ACE_ERROR_RETURN ((LM_ERROR, - "Unable to get navigation component\n"), + "Unable to get provider component\n"), 1); } @@ -656,8 +672,8 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) "Unable to get navigation interface\n"), 1); } - ::Components::CCMObject_var cmp = ::Components::CCMObject::_narrow (obj); - ret = run_test (nav.in (), cmp.in ()); + ::Components::CCMObject_var prov_cmp = ::Components::CCMObject::_narrow (prov); + ret = run_test (nav.in (), prov_cmp.in ()); ACE_DEBUG ((LM_DEBUG, "\n\n===============================\n")); cmd.test_provider_component (); diff --git a/CIAO/tests/CIF/Receptacle/client.cpp b/CIAO/tests/CIF/Receptacle/client.cpp index f9e5298ebf8..852004da52e 100644 --- a/CIAO/tests/CIF/Receptacle/client.cpp +++ b/CIAO/tests/CIF/Receptacle/client.cpp @@ -334,7 +334,7 @@ test_get_named_receptacles (::Components::Receptacles_ptr rec) ::Components::ReceptacleDescriptions_var descriptions; - ::Components::NameList one_name; + ::Components::NameList_var one_name; one_name.length (1); one_name[0] = ::CORBA::string_dup ("use_cif_foo"); @@ -372,7 +372,7 @@ test_get_named_receptacles (::Components::Receptacles_ptr rec) ACE_DEBUG ((LM_DEBUG, "Receptacle test_get_named_receptacles - " "Test with one name passed!\n")); - ::Components::NameList two_names; + ::Components::NameList_var two_names; two_names.length (2); two_names[0] = ::CORBA::string_dup ("use_cif_foo"); two_names[1] = ::CORBA::string_dup ("use_cif_derived_foo"); @@ -413,7 +413,7 @@ test_get_named_receptacles (::Components::Receptacles_ptr rec) // test invalid name exception during invocation of get_named_receptacles - ::Components::NameList invalid_names; + ::Components::NameList_var invalid_names; invalid_names.length (2); invalid_names[0] = ::CORBA::string_dup ("use_cif_foo"); invalid_names[1] = ::CORBA::string_dup ("use_cif_foo_invalid_name"); @@ -701,7 +701,7 @@ test_get_named_consumers (::Components::CCMObject_ptr cmp) ::Components::ConsumerDescriptions_var cds; try { - ::Components::NameList one_name; + ::Components::NameList_var one_name; one_name.length (1); one_name[0] = ::CORBA::string_dup ("consume_do_something"); cds = cmp->get_named_consumers (one_name); @@ -740,7 +740,7 @@ test_get_named_consumers (::Components::CCMObject_ptr cmp) // Test InvalidName exception try { - ::Components::NameList invalid_names; + ::Components::NameList_var invalid_names; invalid_names.length (2); invalid_names[0] = ::CORBA::string_dup ("consume_do_something"); invalid_names[1] = ::CORBA::string_dup ("consume_do_something_invalid_name"); @@ -831,6 +831,7 @@ ACE_TMAIN (int argc, ACE_TCHAR **argv) 1); } + ::Components::Receptacles_var rec = cmd.get_receptacle_interface (); ::Components::Navigation_var nav = cmd.get_navigation_interface (); |