blob: 4f68b5cc8cdb8b611fb5ca68e56b1997a1deaa59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// $Id$
// This is a simple test of an ImR using the corba interfaces
// Start with -orbinitref Test=...
#include "testC.h"
#include "ace/Log_Msg.h"
using namespace CORBA;
int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) {
try
{
ORB_var orb = ORB_init(argc, argv);
Object_var obj = orb->resolve_initial_references("Test");
test_var test = test::_narrow(obj.in());
ACE_ASSERT(! is_nil(test.in()));
Long n = test->get();
Long m = test->get();
if (m == n + 1)
ACE_DEBUG((LM_DEBUG, "Client: All tests ran successfully.\n"));
else
ACE_DEBUG((LM_DEBUG, "Error: Client Expected %d = %d + 1.\n", m, n));
return 0;
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("client:");
}
return -1;
}
|