diff options
Diffstat (limited to 'TAO/tests/OBV/ValueBox')
-rw-r--r-- | TAO/tests/OBV/ValueBox/Test_impl.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/OBV/ValueBox/client.cpp | 25 | ||||
-rw-r--r-- | TAO/tests/OBV/ValueBox/server.cpp | 13 | ||||
-rw-r--r-- | TAO/tests/OBV/ValueBox/valuebox.mpc | 5 |
4 files changed, 26 insertions, 21 deletions
diff --git a/TAO/tests/OBV/ValueBox/Test_impl.cpp b/TAO/tests/OBV/ValueBox/Test_impl.cpp index 2c74111f3f3..de55b910cc5 100644 --- a/TAO/tests/OBV/ValueBox/Test_impl.cpp +++ b/TAO/tests/OBV/ValueBox/Test_impl.cpp @@ -268,7 +268,7 @@ Test_impl::array_op1 (::VBlongarray * p1, ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - long array_len = sizeof(LongArray) / sizeof(CORBA::Long); + long array_len = sizeof(LongArray) / sizeof(long); for (long i=0; i<array_len; i++) { @@ -294,7 +294,7 @@ Test_impl::array_op2 (const ::LongArray p1, ACE_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { - long array_len = sizeof(LongArray) / sizeof(CORBA::Long); + long array_len = sizeof(LongArray) / sizeof(long); long i; for (i=0; i<array_len; i++) diff --git a/TAO/tests/OBV/ValueBox/client.cpp b/TAO/tests/OBV/ValueBox/client.cpp index 27e63f25ec2..d7f198751d3 100644 --- a/TAO/tests/OBV/ValueBox/client.cpp +++ b/TAO/tests/OBV/ValueBox/client.cpp @@ -2,6 +2,7 @@ #include "valueboxC.h" #include "ace/Get_Opt.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(ValueBox, client, @@ -13,7 +14,7 @@ const char *ior = "file://test.ior"; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "k:"); + ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:"); int c; while ((c = get_opts ()) != -1) @@ -545,7 +546,7 @@ int test_boxed_sequence (void) VBseqlong (), 1); - VBseqlong *temp = 0; + VBseqlong *temp; ACE_NEW_RETURN (temp, VBseqlong (), 1); @@ -562,7 +563,7 @@ int test_boxed_sequence (void) longarray[2] = 303; // Create a sequence - TDseqlong *temp2 = 0; + TDseqlong *temp2; ACE_NEW_RETURN (temp2, TDseqlong(10, 3, longarray, 1), 1); @@ -610,6 +611,7 @@ int test_boxed_sequence (void) // release vbseqlong1->_remove_ref (); + vbseqlong3->_remove_ref (); vbseqlong4->_remove_ref (); return fail; @@ -729,11 +731,10 @@ int test_boxed_struct (void) 1); // Test boxed copy ctor. - VBfixed_struct1* valuebox2_ptr = 0; - ACE_NEW_RETURN (valuebox2_ptr, + VBfixed_struct1_var valuebox2; + ACE_NEW_RETURN (valuebox2, VBfixed_struct1 (*valuebox1), 1); - VBfixed_struct1_var valuebox2 = valuebox2_ptr; VERIFY (valuebox1->l () == valuebox2->l ()); VERIFY ((valuebox1->abstruct ()).s1 == (valuebox2->abstruct ()).s1 ); @@ -792,8 +793,9 @@ int test_boxed_struct (void) } // - // valuebox1 and valuebox3 must be explicitly removed. + // valuebox1, valuebox2, and valuebox3 must be explicitly removed. CORBA::remove_ref (valuebox1); + CORBA::remove_ref (valuebox2); CORBA::remove_ref (valuebox3); // @@ -1440,19 +1442,20 @@ int test_boxed_union_invocations (Test * test_object) } int -main (int argc, char *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); + Test_var test_object; CORBA::ORB_var orb; - ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY_EX (init) { - orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + orb = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (init); - if (parse_args (argc, argv) != 0) + if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0) return 1; // Obtain reference to the object. diff --git a/TAO/tests/OBV/ValueBox/server.cpp b/TAO/tests/OBV/ValueBox/server.cpp index 4eaa84c6db0..a3b3911538f 100644 --- a/TAO/tests/OBV/ValueBox/server.cpp +++ b/TAO/tests/OBV/ValueBox/server.cpp @@ -4,6 +4,7 @@ #include "ace/Get_Opt.h" #include "ace/OS_NS_stdio.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(ValueBox, server, @@ -14,7 +15,7 @@ const char *ior_output_file = "test.ior"; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "o:"); + ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:"); int c; while ((c = get_opts ()) != -1) @@ -38,12 +39,14 @@ parse_args (int argc, char *argv[]) } int -main (int argc, char *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + ACE_Argv_Type_Converter convert (argc, argv); + ACE_TRY_NEW_ENV { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var poa_object = @@ -63,7 +66,7 @@ main (int argc, char *argv[]) root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - if (parse_args (argc, argv) != 0) + if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0) return 1; Test_impl *test_impl; @@ -81,7 +84,7 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w")); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", diff --git a/TAO/tests/OBV/ValueBox/valuebox.mpc b/TAO/tests/OBV/ValueBox/valuebox.mpc index 64145b1880f..9d07560ab99 100644 --- a/TAO/tests/OBV/ValueBox/valuebox.mpc +++ b/TAO/tests/OBV/ValueBox/valuebox.mpc @@ -1,7 +1,7 @@ // -*- MPC -*- // $Id$ -project(*Server): taoserver, valuetype { +project(*Server): taoexe, portableserver, valuetype { IDL_Files { vb_basic.idl vb_struct.idl @@ -22,8 +22,7 @@ project(*Server): taoserver, valuetype { } } -project(*Client): taoclient, valuetype { - after += *Server +project(*Client): taoexe, valuetype { Source_Files { vb_basicC.cpp vb_structC.cpp |