3 #include "ace/Get_Opt.h"
4 #include "ace/streams.h"
6 const ACE_TCHAR
*ior
= ACE_TEXT("file://server.ior");
9 parse_args (int argc
, ACE_TCHAR
*argv
[])
11 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
14 while ((c
= get_opts ()) != -1)
18 ior
= get_opts
.opt_arg ();
23 ACE_ERROR_RETURN ((LM_ERROR
,
30 // Indicates successful parsing of the command line
35 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
41 CORBA::ORB_init (argc
, argv
);
43 if (parse_args (argc
, argv
) != 0)
46 CORBA::Object_var tmp
=
47 orb
->string_to_object (ior
);
49 Test::LongDoubleTest_var longDoubleTest
=
50 Test::LongDoubleTest::_narrow (tmp
.in ());
52 if (CORBA::is_nil (longDoubleTest
.in ()))
54 ACE_ERROR_RETURN ((LM_DEBUG
,
55 "Nil Test::LongDoubleTest reference <%s>\n",
60 CORBA::LongDouble ld
=
61 longDoubleTest
->get_long_double ();
63 if (ld
== Global::get_long_double ())
65 cout
<< "Received: " << ld
<< endl
;
70 "Client did not receive "
71 "expected CORBA::LongDouble\n"));
72 cerr
<< "Received: " << ld
<< " instead of "
73 << Global::get_long_double () << endl
;
77 longDoubleTest
->shutdown ();
81 catch (const CORBA::Exception
& ex
)
83 ex
._tao_print_exception ("Exception caught:");