blob: aaadfbd34f169f62872c854753ebc6383b1abcf5 (
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
35
36
37
38
39
40
41
42
43
44
|
// **********************************************************************
//
// Copyright (c) 2001
// ZeroC, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************
#include <Ice/Ice.h>
#include <TestCommon.h>
#include <Test.h>
using namespace std;
Test::MyClassPrx
allTests(const Ice::CommunicatorPtr& communicator)
{
cout << "testing stringToProxy... " << flush;
string ref = "test:default -p 12345 -t 2000";
Ice::ObjectPrx base = communicator->stringToProxy(ref);
test(base);
cout << "ok" << endl;
cout << "testing checked cast... " << flush;
Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base);
test(cl);
Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(cl);
test(derived);
test(cl == base);
test(derived == base);
test(cl == derived);
cout << "ok" << endl;
cout << "testing twoway operations... " << flush;
void twoways(const Test::MyClassPrx&);
twoways(cl);
twoways(derived);
derived->opDerived();
cout << "ok" << endl;
return cl;
}
|