~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cs/test/Ice/slicing/exceptions/AllTests.cs

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// **********************************************************************
2
2
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
4
4
//
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
29
29
            _called = false;
30
30
        }
31
31
        
32
 
        public virtual bool check()
 
32
        public virtual void check()
33
33
        {
34
34
            lock(this)
35
35
            {
36
36
                while(!_called)
37
37
                {
38
 
                    Monitor.Wait(this, TimeSpan.FromMilliseconds(5000));
39
 
                    
40
 
                    if(!_called)
41
 
                    {
42
 
                        return false; // Must be timeout.
43
 
                    }
 
38
                    Monitor.Wait(this);
44
39
                }
45
40
                
46
41
                _called = false;
47
 
                return true;
48
42
            }
49
43
        }
50
44
        
61
55
        private bool _called;
62
56
    }
63
57
    
64
 
    private class AMI_Test_baseAsBaseI : AMI_TestIntf_baseAsBase
 
58
    private class AsyncCallback
65
59
    {
66
 
        public override void ice_response()
 
60
        public void response()
67
61
        {
68
62
            AllTests.test(false);
69
63
        }
70
64
        
71
 
        public override void ice_exception(Ice.Exception exc)
 
65
        public void exception_baseAsBase(Ice.Exception exc)
72
66
        {
73
67
            try
74
68
            {
86
80
            callback.called();
87
81
        }
88
82
        
89
 
        public virtual bool check()
90
 
        {
91
 
            return callback.check();
92
 
        }
93
 
        
94
 
        private Callback callback = new Callback();
95
 
    }
96
 
    
97
 
    private class AMI_Test_unknownDerivedAsBaseI : AMI_TestIntf_unknownDerivedAsBase
98
 
    {
99
 
        public override void ice_response()
100
 
        {
101
 
            AllTests.test(false);
102
 
        }
103
 
        
104
 
        public override void ice_exception(Ice.Exception exc)
 
83
        public void exception_unknownDerivedAsBase(Ice.Exception exc)
105
84
        {
106
85
            try
107
86
            {
119
98
            callback.called();
120
99
        }
121
100
        
122
 
        public virtual bool check()
123
 
        {
124
 
            return callback.check();
125
 
        }
126
 
        
127
 
        private Callback callback = new Callback();
128
 
    }
129
 
    
130
 
    private class AMI_Test_knownDerivedAsBaseI : AMI_TestIntf_knownDerivedAsBase
131
 
    {
132
 
        public override void ice_response()
133
 
        {
134
 
            AllTests.test(false);
135
 
        }
136
 
        
137
 
        public override void ice_exception(Ice.Exception exc)
138
 
        {
139
 
            try
140
 
            {
141
 
                throw exc;
142
 
            }
143
 
            catch(KnownDerived k)
144
 
            {
145
 
                AllTests.test(k.b.Equals("KnownDerived.b"));
146
 
                AllTests.test(k.kd.Equals("KnownDerived.kd"));
147
 
                AllTests.test(k.GetType().Name.Equals("KnownDerived"));
148
 
            }
149
 
            catch(Exception)
150
 
            {
151
 
                AllTests.test(false);
152
 
            }
153
 
            callback.called();
154
 
        }
155
 
        
156
 
        public virtual bool check()
157
 
        {
158
 
            return callback.check();
159
 
        }
160
 
        
161
 
        private Callback callback = new Callback();
162
 
    }
163
 
    
164
 
    private class AMI_Test_knownDerivedAsKnownDerivedI : AMI_TestIntf_knownDerivedAsKnownDerived
165
 
    {
166
 
        public override void ice_response()
167
 
        {
168
 
            AllTests.test(false);
169
 
        }
170
 
        
171
 
        public override void ice_exception(Ice.Exception exc)
172
 
        {
173
 
            try
174
 
            {
175
 
                throw exc;
176
 
            }
177
 
            catch(KnownDerived k)
178
 
            {
179
 
                AllTests.test(k.b.Equals("KnownDerived.b"));
180
 
                AllTests.test(k.kd.Equals("KnownDerived.kd"));
181
 
                AllTests.test(k.GetType().Name.Equals("KnownDerived"));
182
 
            }
183
 
            catch(Exception)
184
 
            {
185
 
                AllTests.test(false);
186
 
            }
187
 
            callback.called();
188
 
        }
189
 
        
190
 
        public virtual bool check()
191
 
        {
192
 
            return callback.check();
193
 
        }
194
 
        
195
 
        private Callback callback = new Callback();
196
 
    }
197
 
    
198
 
    private class AMI_Test_unknownIntermediateAsBaseI : AMI_TestIntf_unknownIntermediateAsBase
199
 
    {
200
 
        public override void ice_response()
201
 
        {
202
 
            AllTests.test(false);
203
 
        }
204
 
        
205
 
        public override void ice_exception(Ice.Exception exc)
 
101
        public void exception_knownDerivedAsBase(Ice.Exception exc)
 
102
        {
 
103
            try
 
104
            {
 
105
                throw exc;
 
106
            }
 
107
            catch(KnownDerived k)
 
108
            {
 
109
                AllTests.test(k.b.Equals("KnownDerived.b"));
 
110
                AllTests.test(k.kd.Equals("KnownDerived.kd"));
 
111
                AllTests.test(k.GetType().Name.Equals("KnownDerived"));
 
112
            }
 
113
            catch(Exception)
 
114
            {
 
115
                AllTests.test(false);
 
116
            }
 
117
            callback.called();
 
118
        }
 
119
        
 
120
        public void exception_knownDerivedAsKnownDerived(Ice.Exception exc)
 
121
        {
 
122
            try
 
123
            {
 
124
                throw exc;
 
125
            }
 
126
            catch(KnownDerived k)
 
127
            {
 
128
                AllTests.test(k.b.Equals("KnownDerived.b"));
 
129
                AllTests.test(k.kd.Equals("KnownDerived.kd"));
 
130
                AllTests.test(k.GetType().Name.Equals("KnownDerived"));
 
131
            }
 
132
            catch(Exception)
 
133
            {
 
134
                AllTests.test(false);
 
135
            }
 
136
            callback.called();
 
137
        }
 
138
        
 
139
        public void exception_unknownIntermediateAsBase(Ice.Exception exc)
206
140
        {
207
141
            try
208
142
            {
220
154
            callback.called();
221
155
        }
222
156
        
223
 
        public virtual bool check()
224
 
        {
225
 
            return callback.check();
226
 
        }
227
 
        
228
 
        private Callback callback = new Callback();
229
 
    }
230
 
    
231
 
    private class AMI_Test_knownIntermediateAsBaseI : AMI_TestIntf_knownIntermediateAsBase
232
 
    {
233
 
        public override void ice_response()
234
 
        {
235
 
            AllTests.test(false);
236
 
        }
237
 
        
238
 
        public override void ice_exception(Ice.Exception exc)
239
 
        {
240
 
            try
241
 
            {
242
 
                throw exc;
243
 
            }
244
 
            catch(KnownIntermediate ki)
245
 
            {
246
 
                AllTests.test(ki.b.Equals("KnownIntermediate.b"));
247
 
                AllTests.test(ki.ki.Equals("KnownIntermediate.ki"));
248
 
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
249
 
            }
250
 
            catch(Exception)
251
 
            {
252
 
                AllTests.test(false);
253
 
            }
254
 
            callback.called();
255
 
        }
256
 
        
257
 
        public virtual bool check()
258
 
        {
259
 
            return callback.check();
260
 
        }
261
 
        
262
 
        private Callback callback = new Callback();
263
 
    }
264
 
    
265
 
    private class AMI_Test_knownMostDerivedAsBaseI : AMI_TestIntf_knownMostDerivedAsBase
266
 
    {
267
 
        public override void ice_response()
268
 
        {
269
 
            AllTests.test(false);
270
 
        }
271
 
        
272
 
        public override void ice_exception(Ice.Exception exc)
273
 
        {
274
 
            try
275
 
            {
276
 
                throw exc;
277
 
            }
278
 
            catch(KnownMostDerived kmd)
279
 
            {
280
 
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
281
 
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
282
 
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
283
 
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
284
 
            }
285
 
            catch(Exception)
286
 
            {
287
 
                AllTests.test(false);
288
 
            }
289
 
            callback.called();
290
 
        }
291
 
        
292
 
        public virtual bool check()
293
 
        {
294
 
            return callback.check();
295
 
        }
296
 
        
297
 
        private Callback callback = new Callback();
298
 
    }
299
 
    
300
 
    private class AMI_Test_knownIntermediateAsKnownIntermediateI : AMI_TestIntf_knownIntermediateAsKnownIntermediate
301
 
    {
302
 
        public override void ice_response()
303
 
        {
304
 
            AllTests.test(false);
305
 
        }
306
 
        
307
 
        public override void ice_exception(Ice.Exception exc)
308
 
        {
309
 
            try
310
 
            {
311
 
                throw exc;
312
 
            }
313
 
            catch(KnownIntermediate ki)
314
 
            {
315
 
                AllTests.test(ki.b.Equals("KnownIntermediate.b"));
316
 
                AllTests.test(ki.ki.Equals("KnownIntermediate.ki"));
317
 
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
318
 
            }
319
 
            catch(Exception)
320
 
            {
321
 
                AllTests.test(false);
322
 
            }
323
 
            callback.called();
324
 
        }
325
 
        
326
 
        public virtual bool check()
327
 
        {
328
 
            return callback.check();
329
 
        }
330
 
        
331
 
        private Callback callback = new Callback();
332
 
    }
333
 
    
334
 
    private class AMI_Test_knownMostDerivedAsKnownIntermediateI : AMI_TestIntf_knownMostDerivedAsKnownIntermediate
335
 
    {
336
 
        public override void ice_response()
337
 
        {
338
 
            AllTests.test(false);
339
 
        }
340
 
        
341
 
        public override void ice_exception(Ice.Exception exc)
342
 
        {
343
 
            try
344
 
            {
345
 
                throw exc;
346
 
            }
347
 
            catch(KnownMostDerived kmd)
348
 
            {
349
 
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
350
 
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
351
 
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
352
 
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
353
 
            }
354
 
            catch(Exception)
355
 
            {
356
 
                AllTests.test(false);
357
 
            }
358
 
            callback.called();
359
 
        }
360
 
        
361
 
        public virtual bool check()
362
 
        {
363
 
            return callback.check();
364
 
        }
365
 
        
366
 
        private Callback callback = new Callback();
367
 
    }
368
 
    
369
 
    private class AMI_Test_knownMostDerivedAsKnownMostDerivedI : AMI_TestIntf_knownMostDerivedAsKnownMostDerived
370
 
    {
371
 
        public override void ice_response()
372
 
        {
373
 
            AllTests.test(false);
374
 
        }
375
 
        
376
 
        public override void ice_exception(Ice.Exception exc)
377
 
        {
378
 
            try
379
 
            {
380
 
                throw exc;
381
 
            }
382
 
            catch(KnownMostDerived kmd)
383
 
            {
384
 
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
385
 
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
386
 
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
387
 
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
388
 
            }
389
 
            catch(Exception)
390
 
            {
391
 
                AllTests.test(false);
392
 
            }
393
 
            callback.called();
394
 
        }
395
 
        
396
 
        public virtual bool check()
397
 
        {
398
 
            return callback.check();
399
 
        }
400
 
        
401
 
        private Callback callback = new Callback();
402
 
    }
403
 
    
404
 
    private class AMI_Test_unknownMostDerived1AsBaseI : AMI_TestIntf_unknownMostDerived1AsBase
405
 
    {
406
 
        public override void ice_response()
407
 
        {
408
 
            AllTests.test(false);
409
 
        }
410
 
        
411
 
        public override void ice_exception(Ice.Exception exc)
412
 
        {
413
 
            try
414
 
            {
415
 
                throw exc;
416
 
            }
417
 
            catch(KnownIntermediate ki)
418
 
            {
419
 
                AllTests.test(ki.b.Equals("UnknownMostDerived1.b"));
420
 
                AllTests.test(ki.ki.Equals("UnknownMostDerived1.ki"));
421
 
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
422
 
            }
423
 
            catch(Exception)
424
 
            {
425
 
                AllTests.test(false);
426
 
            }
427
 
            callback.called();
428
 
        }
429
 
        
430
 
        public virtual bool check()
431
 
        {
432
 
            return callback.check();
433
 
        }
434
 
        
435
 
        private Callback callback = new Callback();
436
 
    }
437
 
    
438
 
    private class AMI_Test_unknownMostDerived1AsKnownIntermediateI : AMI_TestIntf_unknownMostDerived1AsKnownIntermediate
439
 
    {
440
 
        public override void ice_response()
441
 
        {
442
 
            AllTests.test(false);
443
 
        }
444
 
        
445
 
        public override void ice_exception(Ice.Exception exc)
446
 
        {
447
 
            try
448
 
            {
449
 
                throw exc;
450
 
            }
451
 
            catch(KnownIntermediate ki)
452
 
            {
453
 
                AllTests.test(ki.b.Equals("UnknownMostDerived1.b"));
454
 
                AllTests.test(ki.ki.Equals("UnknownMostDerived1.ki"));
455
 
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
456
 
            }
457
 
            catch(Exception)
458
 
            {
459
 
                AllTests.test(false);
460
 
            }
461
 
            callback.called();
462
 
        }
463
 
        
464
 
        public virtual bool check()
465
 
        {
466
 
            return callback.check();
467
 
        }
468
 
        
469
 
        private Callback callback = new Callback();
470
 
    }
471
 
    
472
 
    private class AMI_Test_unknownMostDerived2AsBaseI : AMI_TestIntf_unknownMostDerived2AsBase
473
 
    {
474
 
        public override void ice_response()
475
 
        {
476
 
            AllTests.test(false);
477
 
        }
478
 
        
479
 
        public override void ice_exception(Ice.Exception exc)
 
157
        public void exception_knownIntermediateAsBase(Ice.Exception exc)
 
158
        {
 
159
            try
 
160
            {
 
161
                throw exc;
 
162
            }
 
163
            catch(KnownIntermediate ki)
 
164
            {
 
165
                AllTests.test(ki.b.Equals("KnownIntermediate.b"));
 
166
                AllTests.test(ki.ki.Equals("KnownIntermediate.ki"));
 
167
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
 
168
            }
 
169
            catch(Exception)
 
170
            {
 
171
                AllTests.test(false);
 
172
            }
 
173
            callback.called();
 
174
        }
 
175
        
 
176
        public void exception_knownMostDerivedAsBase(Ice.Exception exc)
 
177
        {
 
178
            try
 
179
            {
 
180
                throw exc;
 
181
            }
 
182
            catch(KnownMostDerived kmd)
 
183
            {
 
184
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
 
185
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
 
186
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
 
187
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
 
188
            }
 
189
            catch(Exception)
 
190
            {
 
191
                AllTests.test(false);
 
192
            }
 
193
            callback.called();
 
194
        }
 
195
        
 
196
        public void exception_knownIntermediateAsKnownIntermediate(Ice.Exception exc)
 
197
        {
 
198
            try
 
199
            {
 
200
                throw exc;
 
201
            }
 
202
            catch(KnownIntermediate ki)
 
203
            {
 
204
                AllTests.test(ki.b.Equals("KnownIntermediate.b"));
 
205
                AllTests.test(ki.ki.Equals("KnownIntermediate.ki"));
 
206
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
 
207
            }
 
208
            catch(Exception)
 
209
            {
 
210
                AllTests.test(false);
 
211
            }
 
212
            callback.called();
 
213
        }
 
214
        
 
215
        public void exception_knownMostDerivedAsKnownIntermediate(Ice.Exception exc)
 
216
        {
 
217
            try
 
218
            {
 
219
                throw exc;
 
220
            }
 
221
            catch(KnownMostDerived kmd)
 
222
            {
 
223
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
 
224
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
 
225
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
 
226
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
 
227
            }
 
228
            catch(Exception)
 
229
            {
 
230
                AllTests.test(false);
 
231
            }
 
232
            callback.called();
 
233
        }
 
234
        
 
235
        public void exception_knownMostDerivedAsKnownMostDerived(Ice.Exception exc)
 
236
        {
 
237
            try
 
238
            {
 
239
                throw exc;
 
240
            }
 
241
            catch(KnownMostDerived kmd)
 
242
            {
 
243
                AllTests.test(kmd.b.Equals("KnownMostDerived.b"));
 
244
                AllTests.test(kmd.ki.Equals("KnownMostDerived.ki"));
 
245
                AllTests.test(kmd.kmd.Equals("KnownMostDerived.kmd"));
 
246
                AllTests.test(kmd.GetType().Name.Equals("KnownMostDerived"));
 
247
            }
 
248
            catch(Exception)
 
249
            {
 
250
                AllTests.test(false);
 
251
            }
 
252
            callback.called();
 
253
        }
 
254
        
 
255
        public void exception_unknownMostDerived1AsBase(Ice.Exception exc)
 
256
        {
 
257
            try
 
258
            {
 
259
                throw exc;
 
260
            }
 
261
            catch(KnownIntermediate ki)
 
262
            {
 
263
                AllTests.test(ki.b.Equals("UnknownMostDerived1.b"));
 
264
                AllTests.test(ki.ki.Equals("UnknownMostDerived1.ki"));
 
265
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
 
266
            }
 
267
            catch(Exception)
 
268
            {
 
269
                AllTests.test(false);
 
270
            }
 
271
            callback.called();
 
272
        }
 
273
        
 
274
        public void exception_unknownMostDerived1AsKnownIntermediate(Ice.Exception exc)
 
275
        {
 
276
            try
 
277
            {
 
278
                throw exc;
 
279
            }
 
280
            catch(KnownIntermediate ki)
 
281
            {
 
282
                AllTests.test(ki.b.Equals("UnknownMostDerived1.b"));
 
283
                AllTests.test(ki.ki.Equals("UnknownMostDerived1.ki"));
 
284
                AllTests.test(ki.GetType().Name.Equals("KnownIntermediate"));
 
285
            }
 
286
            catch(Exception)
 
287
            {
 
288
                AllTests.test(false);
 
289
            }
 
290
            callback.called();
 
291
        }
 
292
        
 
293
        public void exception_unknownMostDerived2AsBase(Ice.Exception exc)
480
294
        {
481
295
            try
482
296
            {
494
308
            callback.called();
495
309
        }
496
310
        
497
 
        public virtual bool check()
 
311
        public virtual void check()
498
312
        {
499
 
            return callback.check();
 
313
            callback.check();
500
314
        }
501
315
        
502
316
        private Callback callback = new Callback();
541
355
        Console.Out.Write("base (AMI)... ");
542
356
        Console.Out.Flush();
543
357
        {
544
 
            AMI_Test_baseAsBaseI cb = new AMI_Test_baseAsBaseI();
545
 
            testPrx.baseAsBase_async(cb);
546
 
            test(cb.check());
 
358
            AsyncCallback cb = new AsyncCallback();
 
359
            testPrx.begin_baseAsBase().whenCompleted(cb.response, cb.exception_baseAsBase);
 
360
            cb.check();
547
361
        }
548
362
        Console.Out.WriteLine("ok");
549
363
        
570
384
        Console.Out.Write("slicing of unknown derived (AMI)... ");
571
385
        Console.Out.Flush();
572
386
        {
573
 
            AMI_Test_unknownDerivedAsBaseI cb = new AMI_Test_unknownDerivedAsBaseI();
574
 
            testPrx.unknownDerivedAsBase_async(cb);
575
 
            test(cb.check());
 
387
            AsyncCallback cb = new AsyncCallback();
 
388
            testPrx.begin_unknownDerivedAsBase().whenCompleted(cb.response, cb.exception_unknownDerivedAsBase);
 
389
            cb.check();
576
390
        }
577
391
        Console.Out.WriteLine("ok");
578
392
        
600
414
        Console.Out.Write("non-slicing of known derived as base (AMI)... ");
601
415
        Console.Out.Flush();
602
416
        {
603
 
            AMI_Test_knownDerivedAsBaseI cb = new AMI_Test_knownDerivedAsBaseI();
604
 
            testPrx.knownDerivedAsBase_async(cb);
605
 
            test(cb.check());
 
417
            AsyncCallback cb = new AsyncCallback();
 
418
            testPrx.begin_knownDerivedAsBase().whenCompleted(cb.response, cb.exception_knownDerivedAsBase);
 
419
            cb.check();
606
420
        }
607
421
        Console.Out.WriteLine("ok");
608
422
        
630
444
        Console.Out.Write("non-slicing of known derived as derived (AMI)... ");
631
445
        Console.Out.Flush();
632
446
        {
633
 
            AMI_Test_knownDerivedAsKnownDerivedI cb = new AMI_Test_knownDerivedAsKnownDerivedI();
634
 
            testPrx.knownDerivedAsKnownDerived_async(cb);
635
 
            test(cb.check());
 
447
            AsyncCallback cb = new AsyncCallback();
 
448
            testPrx.begin_knownDerivedAsKnownDerived().whenCompleted(
 
449
                        cb.response, cb.exception_knownDerivedAsKnownDerived);
 
450
            cb.check();
636
451
        }
637
452
        Console.Out.WriteLine("ok");
638
453
        
659
474
        Console.Out.Write("slicing of unknown intermediate as base (AMI)... ");
660
475
        Console.Out.Flush();
661
476
        {
662
 
            AMI_Test_unknownIntermediateAsBaseI cb = new AMI_Test_unknownIntermediateAsBaseI();
663
 
            testPrx.unknownIntermediateAsBase_async(cb);
664
 
            test(cb.check());
 
477
            AsyncCallback cb = new AsyncCallback();
 
478
            testPrx.begin_unknownIntermediateAsBase().whenCompleted(
 
479
                        cb.response, cb.exception_unknownIntermediateAsBase);
 
480
            cb.check();
665
481
        }
666
482
        Console.Out.WriteLine("ok");
667
483
        
689
505
        Console.Out.Write("slicing of known intermediate as base (AMI)... ");
690
506
        Console.Out.Flush();
691
507
        {
692
 
            AMI_Test_knownIntermediateAsBaseI cb = new AMI_Test_knownIntermediateAsBaseI();
693
 
            testPrx.knownIntermediateAsBase_async(cb);
694
 
            test(cb.check());
 
508
            AsyncCallback cb = new AsyncCallback();
 
509
            testPrx.begin_knownIntermediateAsBase().whenCompleted(
 
510
                        cb.response, cb.exception_knownIntermediateAsBase);
 
511
            cb.check();
695
512
        }
696
513
        Console.Out.WriteLine("ok");
697
514
        
720
537
        Console.Out.Write("slicing of known most derived as base (AMI)... ");
721
538
        Console.Out.Flush();
722
539
        {
723
 
            AMI_Test_knownMostDerivedAsBaseI cb = new AMI_Test_knownMostDerivedAsBaseI();
724
 
            testPrx.knownMostDerivedAsBase_async(cb);
725
 
            test(cb.check());
 
540
            AsyncCallback cb = new AsyncCallback();
 
541
            testPrx.begin_knownMostDerivedAsBase().whenCompleted(
 
542
                        cb.response, cb.exception_knownMostDerivedAsBase);
 
543
            cb.check();
726
544
        }
727
545
        Console.Out.WriteLine("ok");
728
546
        
750
568
        Console.Out.Write("non-slicing of known intermediate as intermediate (AMI)... ");
751
569
        Console.Out.Flush();
752
570
        {
753
 
            AMI_Test_knownIntermediateAsKnownIntermediateI cb = new AMI_Test_knownIntermediateAsKnownIntermediateI();
754
 
            testPrx.knownIntermediateAsKnownIntermediate_async(cb);
755
 
            test(cb.check());
 
571
            AsyncCallback cb = new AsyncCallback();
 
572
            testPrx.begin_knownIntermediateAsKnownIntermediate().whenCompleted(
 
573
                        cb.response, cb.exception_knownIntermediateAsKnownIntermediate);
 
574
            cb.check();
756
575
        }
757
576
        Console.Out.WriteLine("ok");
758
577
        
781
600
        Console.Out.Write("non-slicing of known most derived as intermediate (AMI)... ");
782
601
        Console.Out.Flush();
783
602
        {
784
 
            AMI_Test_knownMostDerivedAsKnownIntermediateI cb = new AMI_Test_knownMostDerivedAsKnownIntermediateI();
785
 
            testPrx.knownMostDerivedAsKnownIntermediate_async(cb);
786
 
            test(cb.check());
 
603
            AsyncCallback cb = new AsyncCallback();
 
604
            testPrx.begin_knownMostDerivedAsKnownIntermediate().whenCompleted(
 
605
                        cb.response, cb.exception_knownMostDerivedAsKnownIntermediate);
 
606
            cb.check();
787
607
        }
788
608
        Console.Out.WriteLine("ok");
789
609
        
812
632
        Console.Out.Write("non-slicing of known most derived as most derived (AMI)... ");
813
633
        Console.Out.Flush();
814
634
        {
815
 
            AMI_Test_knownMostDerivedAsKnownMostDerivedI cb = new AMI_Test_knownMostDerivedAsKnownMostDerivedI();
816
 
            testPrx.knownMostDerivedAsKnownMostDerived_async(cb);
817
 
            AllTests.test(cb.check());
 
635
            AsyncCallback cb = new AsyncCallback();
 
636
            testPrx.begin_knownMostDerivedAsKnownMostDerived().whenCompleted(
 
637
                        cb.response, cb.exception_knownMostDerivedAsKnownMostDerived);
 
638
            cb.check();
818
639
        }
819
640
        Console.Out.WriteLine("ok");
820
641
        
842
663
        Console.Out.Write("slicing of unknown most derived, known intermediate as base (AMI)... ");
843
664
        Console.Out.Flush();
844
665
        {
845
 
            AMI_Test_unknownMostDerived1AsBaseI cb = new AMI_Test_unknownMostDerived1AsBaseI();
846
 
            testPrx.unknownMostDerived1AsBase_async(cb);
847
 
            test(cb.check());
 
666
            AsyncCallback cb = new AsyncCallback();
 
667
            testPrx.begin_unknownMostDerived1AsBase().whenCompleted(
 
668
                        cb.response, cb.exception_unknownMostDerived1AsBase);
 
669
            cb.check();
848
670
        }
849
671
        Console.Out.WriteLine("ok");
850
672
        
872
694
        Console.Out.Write("slicing of unknown most derived, known intermediate as intermediate (AMI)... ");
873
695
        Console.Out.Flush();
874
696
        {
875
 
            AMI_Test_unknownMostDerived1AsKnownIntermediateI cb = new AMI_Test_unknownMostDerived1AsKnownIntermediateI();
876
 
            testPrx.unknownMostDerived1AsKnownIntermediate_async(cb);
877
 
            test(cb.check());
 
697
            AsyncCallback cb = new AsyncCallback();
 
698
            testPrx.begin_unknownMostDerived1AsKnownIntermediate().whenCompleted(
 
699
                        cb.response, cb.exception_unknownMostDerived1AsKnownIntermediate);
 
700
            cb.check();
878
701
        }
879
702
        Console.Out.WriteLine("ok");
880
703
        
901
724
        Console.Out.Write("slicing of unknown most derived, unknown intermediate thrown as base (AMI)... ");
902
725
        Console.Out.Flush();
903
726
        {
904
 
            AMI_Test_unknownMostDerived2AsBaseI cb = new AMI_Test_unknownMostDerived2AsBaseI();
905
 
            testPrx.unknownMostDerived2AsBase_async(cb);
906
 
            test(cb.check());
 
727
            AsyncCallback cb = new AsyncCallback();
 
728
            testPrx.begin_unknownMostDerived2AsBase().whenCompleted(
 
729
                        cb.response, cb.exception_unknownMostDerived2AsBase);
 
730
            cb.check();
907
731
        }
908
732
        Console.Out.WriteLine("ok");
909
733