diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-01 00:30:50 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-01 00:30:50 +0000 |
commit | 941d92c910263b9a4f3e792c944ad2f3e000341c (patch) | |
tree | cd42c7586fc539696769fab8c1d7fba824c0a5e9 | |
parent | 940a76415e8f2df0c5fc337d6009873abecd94ed (diff) | |
download | ATCD-941d92c910263b9a4f3e792c944ad2f3e000341c.tar.gz |
ChangeLogTag:Wed Jun 30 19:29:53 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 5 | ||||
-rw-r--r-- | TAO/tests/IORManipulation/IORTest.cpp | 40 |
2 files changed, 26 insertions, 19 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index e7b2947b984..8a217cd9d53 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,8 @@ +Wed Jun 30 19:29:53 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tests/IORManipulation/IORTest.cpp: + Fixed debug message. + Wed Jun 30 18:17:00 1999 Jeff Parsons <parsons@cs.wustl.edu> * tao/DynEnum_i.cpp: diff --git a/TAO/tests/IORManipulation/IORTest.cpp b/TAO/tests/IORManipulation/IORTest.cpp index c3ea7092c00..cbb2ad53928 100644 --- a/TAO/tests/IORManipulation/IORTest.cpp +++ b/TAO/tests/IORManipulation/IORTest.cpp @@ -10,7 +10,7 @@ // IORTest.cpp // // = DESCRIPTION -// This program tests the basic functionality of the +// This program tests the basic functionality of the // IOR Manipultion interface. // // = AUTHOR @@ -57,25 +57,25 @@ main (int argc, char **argv) ACE_TRY_ENV); ACE_TRY_CHECK; - TAO_IOP::TAO_IOR_Manipulation_ptr iorm = + TAO_IOP::TAO_IOR_Manipulation_ptr iorm = TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM, ACE_TRY_ENV); ACE_TRY_CHECK; // *********************************************************************** - + // Create a few fictitious IORs - CORBA_Object_ptr name1 = + CORBA_Object_ptr name1 = orb_->string_to_object ("iiop://acme.cs.wustl.edu:6060/xyz", ACE_TRY_ENV); ACE_TRY_CHECK; CORBA_Object_ptr name2 = orb_->string_to_object ("iiop://tango.cs.wustl.edu:7070/xyz", ACE_TRY_ENV); ACE_TRY_CHECK; // *********************************************************************** - + // Get the string reps for these IORs and show them to the user ACE_CString iorm_ior = orb_->object_to_string (IORM, ACE_TRY_ENV); ACE_TRY_CHECK; printf("\tIORManipultion IOR string = %s\n", iorm_ior.c_str()); - + ACE_CString name1_ior = orb_->object_to_string (name1, ACE_TRY_ENV); ACE_TRY_CHECK; printf("\tFirst made up IOR = %s\n", name1_ior.c_str()); @@ -83,17 +83,17 @@ main (int argc, char **argv) ACE_CString name2_ior = orb_->object_to_string (name2, ACE_TRY_ENV); ACE_TRY_CHECK; printf("\tSecond made up IOR = %s\n", name2_ior.c_str()); - + // *********************************************************************** // Create IOR list for use with merge_iors. TAO_IOP::TAO_IOR_Manipulation::IORList iors (2); iors.length(2); iors [0] = name1; iors [1] = name2; - + CORBA_Object_ptr merged = iorm->merge_iors (iors, ACE_TRY_ENV); ACE_TRY_CHECK; - + ACE_CString merged_ior = orb_->object_to_string (merged, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -120,14 +120,14 @@ main (int argc, char **argv) printf ("**ERROR (merge_iors): name1 is_in_ior returned profile count bad (%d)!\n", in_count); - in_count = iorm->is_in_ior (merged, name2, ACE_TRY_ENV); + in_count = iorm->is_in_ior (merged, name2, ACE_TRY_ENV); ACE_TRY_CHECK; if (count2 != in_count) printf ("**ERROR (merge_iors): name2 is_in_ior returned profile count bad (%d)!\n", in_count); // *********************************************************************** - + // Verify ability to remove profiles from an IOR // First remove the second IOR from the merged IOR CORBA_Object_ptr just1 = iorm->remove_profiles (merged, name2, ACE_TRY_ENV); @@ -151,11 +151,11 @@ main (int argc, char **argv) printf ("**ERROR (merge_profiles): incorrect count returned for is_in_ior\ \nafter removal (%d)\n", in_count); // *********************************************************************** - + // Now try the add_profiles interface. CORBA_Object_ptr merged2 = iorm->add_profiles (just1, name2, ACE_TRY_ENV); ACE_TRY_CHECK; - + count = iorm->get_profile_count (merged2, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -166,7 +166,7 @@ main (int argc, char **argv) ACE_TRY_CHECK; printf("\tAdding 2 back in IOR(%d) = %s\n", count, merged2_ior.c_str ()); - + // is_in_ior throws an exception if the intersection of the two // IORs is NULL. in_count = iorm->is_in_ior (merged2, name1, ACE_TRY_ENV); @@ -182,7 +182,7 @@ main (int argc, char **argv) if (count2 != in_count) printf ("**ERROR (add_profiles): is_in_ior returned profile count bad!\n"); // *********************************************************************** - + CORBA_Object_ptr just2 = iorm->remove_profiles (merged2, name1, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -201,9 +201,11 @@ main (int argc, char **argv) ACE_TRY_CHECK; if (count2 != in_count) - printf ("**ERROR (add_profiles): incorrect count returned for is_in_ior after\ - \nremoval\n", in_count); - // *********************************************************************** + ACE_DEBUG ((LM_DEBUG, + "**ERROR (add_profiles): incorrect count (%d) " + "returned for is_in_ior after removal\n", + in_count)); + // all the primary tests worked, set status to 1 Status = 1; // Finally generate an exception and quit. @@ -268,6 +270,6 @@ main (int argc, char **argv) else printf ("Tests Successfully Completed!\n"); printf ("--------------------------------------\n"); - + return 0; } |