diff options
author | vzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-23 12:02:42 +0000 |
---|---|---|
committer | vzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-23 12:02:42 +0000 |
commit | 268576b7f1520ce75d4876ce07721062c550b431 (patch) | |
tree | 1c741f048219642425231914755b998195e4c4e3 /TAO/tests/Bug_3766_Regression/client.cpp | |
parent | 0e0166d51e7729089d342641de9ad6a39804db42 (diff) | |
download | ATCD-268576b7f1520ce75d4876ce07721062c550b431.tar.gz |
Wed Dec 23 11:56:42 UTC 2009 Vladimir Zykov <vladimir.zykov@prismtech.com>
* tests/CodeSets/simple/client.cpp:
* tests/CodeSets/simple/server.cpp:
* tests/CodeSets/simple/run_test.pl:
* tests/Bug_3766_Regression/client.cpp:
* tests/Bug_3766_Regression/server.cpp:
* tests/Bug_3766_Regression/run_test.pl:
Changed the tests so they accept IORs from command line.
* tests/Bug_3790_Regression/server2.cpp:
Fixed compile error on wchar builds.
* bin/tao_orb_tests.lst:
Disabled a test for bug#3542 on static builds.
Diffstat (limited to 'TAO/tests/Bug_3766_Regression/client.cpp')
-rw-r--r-- | TAO/tests/Bug_3766_Regression/client.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/TAO/tests/Bug_3766_Regression/client.cpp b/TAO/tests/Bug_3766_Regression/client.cpp index 73862b53a1c..f573dbc00fb 100644 --- a/TAO/tests/Bug_3766_Regression/client.cpp +++ b/TAO/tests/Bug_3766_Regression/client.cpp @@ -2,8 +2,35 @@ #include "TestC.h" #include "ace/OS.h" +#include "ace/Get_Opt.h" -using namespace std; +const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "\n", + argv [0]), + -1); + } + // Indicates successful parsing of the command line + return 0; +} int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) @@ -13,10 +40,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); - CORBA::Object_var object = orb->string_to_object("file://server.ior"); + CORBA::Object_var object = orb->string_to_object(ior); Test_var test = Test::_narrow (object.in ()); |