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
45
46
47
48
49
50
51
52
53
54
55
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#import <objc/Ice.h>
#import <TestCommon.h>
#import <OperationsTest.h>
id<TestOperationsMyClassPrx>
operationsAllTests(id<ICECommunicator> communicator)
{
NSString* ref = [NSString stringWithFormat:@"test:%@", getTestEndpoint(communicator, 0)];
id<ICEObjectPrx> base = [communicator stringToProxy:(ref)];
id<TestOperationsMyClassPrx> cl = [TestOperationsMyClassPrx checkedCast:base];
id<TestOperationsMyDerivedClassPrx> derived = [TestOperationsMyDerivedClassPrx checkedCast:cl];
id<TestOperationsMBPrx> bprx =
[TestOperationsMBPrx checkedCast:[communicator stringToProxy: [NSString stringWithFormat:@"b:%@", getTestEndpoint(communicator, 0)]]];
tprintf("testing twoway operations... ");
void twoways(id<ICECommunicator>, id<TestOperationsMyClassPrx>, id<TestOperationsMBPrx>);
twoways(communicator, cl, bprx);
twoways(communicator, derived, bprx);
[derived opDerived];
tprintf("ok\n");
tprintf("testing oneway operations... ");
void oneways(id<ICECommunicator>, id<TestOperationsMyClassPrx>);
oneways(communicator, cl);
tprintf("ok\n");
tprintf("testing twoway operations with AMI... ");
void twowaysAMI(id<ICECommunicator>, id<TestOperationsMyClassPrx>);
twowaysAMI(communicator, cl);
twowaysAMI(communicator, derived);
tprintf("ok\n");
tprintf("testing oneway operations with AMI... ");
void onewaysAMI(id<ICECommunicator>, id<TestOperationsMyClassPrx>);
onewaysAMI(communicator, cl);
tprintf("ok\n");
tprintf("testing batch oneway operations... ");
void batchOneways(id<TestOperationsMyClassPrx>);
batchOneways(cl);
batchOneways(derived);
tprintf("ok\n");
tprintf("testing batch oneway operations with AMI... ");
void batchOnewaysAMI(id<TestOperationsMyClassPrx>);
batchOnewaysAMI(cl);
batchOnewaysAMI(derived);
tprintf("ok\n");
return cl;
}
|