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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martín
  • Date: 2011-06-25 19:44:26 UTC
  • mfrom: (6.1.16 sid)
  • Revision ID: james.westby@ubuntu.com-20110625194426-9fip3u3hlwheohvl
Tags: 3.4.2-1
New upstream release (Closes: #631456).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// **********************************************************************
2
2
//
3
 
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
3
// Copyright (c) 2003-2011 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.
22
22
            throw new System.Exception();
23
23
        }
24
24
    }
25
 
    
 
25
 
26
26
    private class Callback
27
27
    {
28
28
        internal Callback()
29
29
        {
30
30
            _called = false;
31
31
        }
32
 
        
 
32
 
33
33
        public virtual void check()
34
34
        {
35
 
            lock(this)
 
35
            _m.Lock();
 
36
            try
36
37
            {
37
38
                while(!_called)
38
39
                {
39
 
                    Monitor.Wait(this);
 
40
                    _m.Wait();
40
41
                }
41
 
                
 
42
 
42
43
                _called = false;
43
44
            }
 
45
            finally
 
46
            {
 
47
                _m.Unlock();
 
48
            }
44
49
        }
45
 
        
 
50
 
46
51
        public virtual void called()
47
52
        {
48
 
            lock(this)
 
53
            _m.Lock();
 
54
            try
49
55
            {
50
56
                Debug.Assert(!_called);
51
57
                _called = true;
52
 
                Monitor.Pulse(this);
 
58
                _m.Notify();
 
59
            }
 
60
            finally
 
61
            {
 
62
                _m.Unlock();
53
63
            }
54
64
        }
55
 
        
 
65
 
56
66
        private bool _called;
 
67
        private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
57
68
    }
58
 
    
 
69
 
59
70
    private class AsyncCallback
60
71
    {
61
72
        public void response_SBaseAsObject(Ice.Object o)
67
78
            AllTests.test(sb.sb.Equals("SBase.sb"));
68
79
            callback.called();
69
80
        }
70
 
        
 
81
 
71
82
        public void response_SBaseAsSBase(SBase sb)
72
83
        {
73
84
            AllTests.test(sb.sb.Equals("SBase.sb"));
74
85
            callback.called();
75
86
        }
76
 
        
 
87
 
77
88
        public void response_SBSKnownDerivedAsSBase(SBase sb)
78
89
        {
79
90
            AllTests.test(sb.sb.Equals("SBSKnownDerived.sb"));
82
93
            AllTests.test(sbskd.sbskd.Equals("SBSKnownDerived.sbskd"));
83
94
            callback.called();
84
95
        }
85
 
        
 
96
 
86
97
        public void response_SBSKnownDerivedAsSBSKnownDerived(SBSKnownDerived sbskd)
87
98
        {
88
99
            AllTests.test(sbskd.sbskd.Equals("SBSKnownDerived.sbskd"));
89
100
            callback.called();
90
101
        }
91
 
        
 
102
 
92
103
        public void response_SBSUnknownDerivedAsSBase(SBase sb)
93
104
        {
94
105
            AllTests.test(sb.sb.Equals("SBSUnknownDerived.sb"));
95
106
            callback.called();
96
107
        }
97
 
        
 
108
 
98
109
        public void response_SUnknownAsObject(Ice.Object o)
99
110
        {
100
111
            AllTests.test(false);
101
112
        }
102
 
        
 
113
 
103
114
        public void exception_SUnknownAsObject(Ice.Exception exc)
104
115
        {
105
116
            AllTests.test(exc.GetType().FullName.Equals("Ice.NoObjectFactoryException"));
106
117
            callback.called();
107
118
        }
108
 
        
 
119
 
109
120
        public void response_oneElementCycle(B b)
110
121
        {
111
122
            AllTests.test(b != null);
114
125
            AllTests.test(b.pb == b);
115
126
            callback.called();
116
127
        }
117
 
        
 
128
 
118
129
        public void response_twoElementCycle(B b1)
119
130
        {
120
131
            AllTests.test(b1 != null);
121
132
            AllTests.test(b1.ice_id().Equals("::Test::B"));
122
133
            AllTests.test(b1.sb.Equals("B1.sb"));
123
 
            
 
134
 
124
135
            B b2 = b1.pb;
125
136
            AllTests.test(b2 != null);
126
137
            AllTests.test(b2.ice_id().Equals("::Test::B"));
128
139
            AllTests.test(b2.pb == b1);
129
140
            callback.called();
130
141
        }
131
 
        
 
142
 
132
143
        public void response_D1AsB(B b1)
133
144
        {
134
145
            AllTests.test(b1 != null);
142
153
            AllTests.test(d1.pd1 != null);
143
154
            AllTests.test(d1.pd1 != b1);
144
155
            AllTests.test(b1.pb == d1.pd1);
145
 
            
 
156
 
146
157
            B b2 = b1.pb;
147
158
            AllTests.test(b2 != null);
148
159
            AllTests.test(b2.pb == b1);
150
161
            AllTests.test(b2.ice_id().Equals("::Test::B"));
151
162
            callback.called();
152
163
        }
153
 
        
 
164
 
154
165
        public void response_D1AsD1(D1 d1)
155
166
        {
156
167
            AllTests.test(d1 != null);
158
169
            AllTests.test(d1.sb.Equals("D1.sb"));
159
170
            AllTests.test(d1.pb != null);
160
171
            AllTests.test(d1.pb != d1);
161
 
            
 
172
 
162
173
            B b2 = d1.pb;
163
174
            AllTests.test(b2 != null);
164
175
            AllTests.test(b2.ice_id().Equals("::Test::B"));
166
177
            AllTests.test(b2.pb == d1);
167
178
            callback.called();
168
179
        }
169
 
        
 
180
 
170
181
        public void response_D2AsB(B b2)
171
182
        {
172
183
            AllTests.test(b2 != null);
174
185
            AllTests.test(b2.sb.Equals("D2.sb"));
175
186
            AllTests.test(b2.pb != null);
176
187
            AllTests.test(b2.pb != b2);
177
 
            
 
188
 
178
189
            B b1 = b2.pb;
179
190
            AllTests.test(b1 != null);
180
191
            AllTests.test(b1.ice_id().Equals("::Test::D1"));
186
197
            AllTests.test(d1.pd1 == b2);
187
198
            callback.called();
188
199
        }
189
 
        
 
200
 
190
201
        public void response_paramTest1(B b1, B b2)
191
202
        {
192
203
            AllTests.test(b1 != null);
197
208
            AllTests.test(d1 != null);
198
209
            AllTests.test(d1.sd1.Equals("D1.sd1"));
199
210
            AllTests.test(d1.pd1 == b2);
200
 
            
 
211
 
201
212
            AllTests.test(b2 != null);
202
213
            AllTests.test(b2.ice_id().Equals("::Test::B")); // No factory, must be sliced
203
214
            AllTests.test(b2.sb.Equals("D2.sb"));
204
215
            AllTests.test(b2.pb == b1);
205
216
            callback.called();
206
217
        }
207
 
        
 
218
 
208
219
        public void response_paramTest2(B b2, B b1)
209
220
        {
210
221
            AllTests.test(b1 != null);
215
226
            AllTests.test(d1 != null);
216
227
            AllTests.test(d1.sd1.Equals("D1.sd1"));
217
228
            AllTests.test(d1.pd1 == b2);
218
 
            
 
229
 
219
230
            AllTests.test(b2 != null);
220
231
            AllTests.test(b2.ice_id().Equals("::Test::B")); // No factory, must be sliced
221
232
            AllTests.test(b2.sb.Equals("D2.sb"));
222
233
            AllTests.test(b2.pb == b1);
223
234
            callback.called();
224
235
        }
225
 
        
 
236
 
226
237
        public void response_returnTest1(B r, B p1, B p2)
227
238
        {
228
239
            AllTests.test(r == p1);
229
240
            callback.called();
230
241
        }
231
 
        
 
242
 
232
243
        public void response_returnTest2(B r, B p1, B p2)
233
244
        {
234
245
            AllTests.test(r == p1);
235
246
            callback.called();
236
247
        }
237
 
        
 
248
 
238
249
        public void response_returnTest3(B b)
239
250
        {
240
251
            rb = b;
241
252
            callback.called();
242
253
        }
243
 
        
 
254
 
244
255
        public void response_paramTest3(B ret, B p1, B p2)
245
256
        {
246
257
            AllTests.test(p1 != null);
247
258
            AllTests.test(p1.sb.Equals("D2.sb (p1 1)"));
248
259
            AllTests.test(p1.pb == null);
249
260
            AllTests.test(p1.ice_id().Equals("::Test::B"));
250
 
            
 
261
 
251
262
            AllTests.test(p2 != null);
252
263
            AllTests.test(p2.sb.Equals("D2.sb (p2 1)"));
253
264
            AllTests.test(p2.pb == null);
254
265
            AllTests.test(p2.ice_id().Equals("::Test::B"));
255
 
            
 
266
 
256
267
            AllTests.test(ret != null);
257
268
            AllTests.test(ret.sb.Equals("D1.sb (p2 2)"));
258
269
            AllTests.test(ret.pb == null);
259
270
            AllTests.test(ret.ice_id().Equals("::Test::D1"));
260
271
            callback.called();
261
272
        }
262
 
        
 
273
 
263
274
        public void response_paramTest4(B ret, B b)
264
275
        {
265
276
            AllTests.test(b != null);
266
277
            AllTests.test(b.sb.Equals("D4.sb (1)"));
267
278
            AllTests.test(b.pb == null);
268
279
            AllTests.test(b.ice_id().Equals("::Test::B"));
269
 
            
 
280
 
270
281
            AllTests.test(ret != null);
271
282
            AllTests.test(ret.sb.Equals("B.sb (2)"));
272
283
            AllTests.test(ret.pb == null);
273
284
            AllTests.test(ret.ice_id().Equals("::Test::B"));
274
285
            callback.called();
275
286
        }
276
 
        
 
287
 
277
288
        public void response_sequenceTest(SS ss)
278
289
        {
279
290
            rss = ss;
280
291
            callback.called();
281
292
        }
282
 
        
 
293
 
283
294
        public void response_dictionaryTest(Dictionary<int, B> r, Dictionary<int, B> bout)
284
295
        {
285
296
            this.rbdict = (Dictionary<int, B>)r;
286
297
            this.obdict = (Dictionary<int, B>)bout;
287
298
            callback.called();
288
299
        }
289
 
        
 
300
 
290
301
        public void exception_throwBaseAsBase(Ice.Exception exc)
291
302
        {
292
303
            try
303
314
            }
304
315
            callback.called();
305
316
        }
306
 
        
 
317
 
307
318
        public void exception_throwDerivedAsBase(Ice.Exception exc)
308
319
        {
309
320
            try
326
337
            }
327
338
            callback.called();
328
339
        }
329
 
        
 
340
 
330
341
        public void exception_throwDerivedAsDerived(Ice.Exception exc)
331
342
        {
332
343
            try
349
360
            }
350
361
            callback.called();
351
362
        }
352
 
        
 
363
 
353
364
        public void exception_throwUnknownDerivedAsBase(Ice.Exception exc)
354
365
        {
355
366
            try
366
377
            }
367
378
            callback.called();
368
379
        }
369
 
        
 
380
 
370
381
        public void response_useForward(Forward f)
371
382
        {
372
383
            AllTests.test(f != null);
373
384
            callback.called();
374
385
        }
375
 
        
 
386
 
376
387
        public void response()
377
388
        {
378
389
            AllTests.test(false);
379
390
        }
380
 
        
 
391
 
381
392
        public void exception(Ice.Exception exc)
382
393
        {
383
394
            AllTests.test(false);
384
395
        }
385
 
        
 
396
 
386
397
        public virtual void check()
387
398
        {
388
399
            callback.check();
392
403
        public SS rss;
393
404
        public Dictionary<int, B> rbdict;
394
405
        public Dictionary<int, B> obdict;
395
 
        
 
406
 
396
407
        private Callback callback = new Callback();
397
408
    }
398
 
    
 
409
 
399
410
    public static TestIntfPrx allTests(Ice.Communicator communicator, bool collocated)
400
411
    {
401
412
        Console.Out.Write("testing stringToProxy... ");
404
415
        Ice.ObjectPrx basePrx = communicator.stringToProxy(r);
405
416
        test(basePrx != null);
406
417
        Console.Out.WriteLine("ok");
407
 
        
 
418
 
408
419
        Console.Out.Write("testing checked cast... ");
409
420
        Console.Out.Flush();
410
421
        TestIntfPrx testPrx = TestIntfPrxHelper.checkedCast(basePrx);
411
422
        test(testPrx != null);
412
423
        test(testPrx.Equals(basePrx));
413
424
        Console.Out.WriteLine("ok");
414
 
        
 
425
 
415
426
        Console.Out.Write("base as Object... ");
416
427
        Console.Out.Flush();
417
428
        {
432
443
            test(sb.sb.Equals("SBase.sb"));
433
444
        }
434
445
        Console.Out.WriteLine("ok");
435
 
        
 
446
 
436
447
        Console.Out.Write("base as Object (AMI)... ");
437
448
        Console.Out.Flush();
438
449
        {
441
452
            cb.check();
442
453
        }
443
454
        Console.Out.WriteLine("ok");
444
 
        
 
455
 
445
456
        Console.Out.Write("base as base... ");
446
457
        Console.Out.Flush();
447
458
        {
457
468
            }
458
469
        }
459
470
        Console.Out.WriteLine("ok");
460
 
        
 
471
 
461
472
        Console.Out.Write("base as base (AMI)... ");
462
473
        Console.Out.Flush();
463
474
        {
466
477
            cb.check();
467
478
        }
468
479
        Console.Out.WriteLine("ok");
469
 
        
 
480
 
470
481
        Console.Out.Write("base with known derived as base... ");
471
482
        Console.Out.Flush();
472
483
        {
486
497
            test(sbskd.sbskd.Equals("SBSKnownDerived.sbskd"));
487
498
        }
488
499
        Console.Out.WriteLine("ok");
489
 
        
 
500
 
490
501
        Console.Out.Write("base with known derived as base (AMI)... ");
491
502
        Console.Out.Flush();
492
503
        {
495
506
            cb.check();
496
507
        }
497
508
        Console.Out.WriteLine("ok");
498
 
        
 
509
 
499
510
        Console.Out.Write("base with known derived as known derived... ");
500
511
        Console.Out.Flush();
501
512
        {
511
522
            }
512
523
        }
513
524
        Console.Out.WriteLine("ok");
514
 
        
 
525
 
515
526
        Console.Out.Write("base with known derived as known derived (AMI)... ");
516
527
        Console.Out.Flush();
517
528
        {
521
532
            cb.check();
522
533
        }
523
534
        Console.Out.WriteLine("ok");
524
 
        
 
535
 
525
536
        Console.Out.Write("base with unknown derived as base... ");
526
537
        Console.Out.Flush();
527
538
        {
537
548
            }
538
549
        }
539
550
        Console.Out.WriteLine("ok");
540
 
        
 
551
 
541
552
        Console.Out.Write("base with unknown derived as base (AMI)... ");
542
553
        Console.Out.Flush();
543
554
        {
547
558
            cb.check();
548
559
        }
549
560
        Console.Out.WriteLine("ok");
550
 
        
 
561
 
551
562
        Console.Out.Write("unknown with Object as Object... ");
552
563
        Console.Out.Flush();
553
564
        {
565
576
            }
566
577
        }
567
578
        Console.Out.WriteLine("ok");
568
 
        
 
579
 
569
580
        Console.Out.Write("unknown with Object as Object (AMI)... ");
570
581
        Console.Out.Flush();
571
582
        {
582
593
            }
583
594
        }
584
595
        Console.Out.WriteLine("ok");
585
 
        
 
596
 
586
597
        Console.Out.Write("one-element cycle... ");
587
598
        Console.Out.Flush();
588
599
        {
600
611
            }
601
612
        }
602
613
        Console.Out.WriteLine("ok");
603
 
        
 
614
 
604
615
        Console.Out.Write("one-element cycle (AMI)... ");
605
616
        Console.Out.Flush();
606
617
        {
610
621
            cb.check();
611
622
        }
612
623
        Console.Out.WriteLine("ok");
613
 
        
 
624
 
614
625
        Console.Out.Write("two-element cycle... ");
615
626
        Console.Out.Flush();
616
627
        {
620
631
                test(b1 != null);
621
632
                test(b1.ice_id().Equals("::Test::B"));
622
633
                test(b1.sb.Equals("B1.sb"));
623
 
                
 
634
 
624
635
                B b2 = b1.pb;
625
636
                test(b2 != null);
626
637
                test(b2.ice_id().Equals("::Test::B"));
633
644
            }
634
645
        }
635
646
        Console.Out.WriteLine("ok");
636
 
        
 
647
 
637
648
        Console.Out.Write("two-element cycle (AMI)... ");
638
649
        Console.Out.Flush();
639
650
        {
643
654
            cb.check();
644
655
        }
645
656
        Console.Out.WriteLine("ok");
646
 
        
 
657
 
647
658
        Console.Out.Write("known derived pointer slicing as base... ");
648
659
        Console.Out.Flush();
649
660
        {
662
673
                test(d1.pd1 != null);
663
674
                test(d1.pd1 != b1);
664
675
                test(b1.pb == d1.pd1);
665
 
                
 
676
 
666
677
                B b2 = b1.pb;
667
678
                test(b2 != null);
668
679
                test(b2.pb == b1);
675
686
            }
676
687
        }
677
688
        Console.Out.WriteLine("ok");
678
 
        
 
689
 
679
690
        Console.Out.Write("known derived pointer slicing as base (AMI)... ");
680
691
        Console.Out.Flush();
681
692
        {
684
695
            cb.check();
685
696
        }
686
697
        Console.Out.WriteLine("ok");
687
 
        
 
698
 
688
699
        Console.Out.Write("known derived pointer slicing as derived... ");
689
700
        Console.Out.Flush();
690
701
        {
697
708
                test(d1.sb.Equals("D1.sb"));
698
709
                test(d1.pb != null);
699
710
                test(d1.pb != d1);
700
 
                
 
711
 
701
712
                B b2 = d1.pb;
702
713
                test(b2 != null);
703
714
                test(b2.ice_id().Equals("::Test::B"));
710
721
            }
711
722
        }
712
723
        Console.Out.WriteLine("ok");
713
 
        
 
724
 
714
725
        Console.Out.Write("known derived pointer slicing as derived (AMI)... ");
715
726
        Console.Out.Flush();
716
727
        {
719
730
            cb.check();
720
731
        }
721
732
        Console.Out.WriteLine("ok");
722
 
        
 
733
 
723
734
        Console.Out.Write("unknown derived pointer slicing as base... ");
724
735
        Console.Out.Flush();
725
736
        {
732
743
                test(b2.sb.Equals("D2.sb"));
733
744
                test(b2.pb != null);
734
745
                test(b2.pb != b2);
735
 
                
 
746
 
736
747
                B b1 = b2.pb;
737
748
                test(b1 != null);
738
749
                test(b1.ice_id().Equals("::Test::D1"));
749
760
            }
750
761
        }
751
762
        Console.Out.WriteLine("ok");
752
 
        
 
763
 
753
764
        Console.Out.Write("unknown derived pointer slicing as base (AMI)... ");
754
765
        Console.Out.Flush();
755
766
        {
758
769
            cb.check();
759
770
        }
760
771
        Console.Out.WriteLine("ok");
761
 
        
 
772
 
762
773
        Console.Out.Write("param ptr slicing with known first... ");
763
774
        Console.Out.Flush();
764
775
        {
767
778
                B b1;
768
779
                B b2;
769
780
                testPrx.paramTest1(out b1, out b2);
770
 
                
 
781
 
771
782
                test(b1 != null);
772
783
                test(b1.ice_id().Equals("::Test::D1"));
773
784
                test(b1.sb.Equals("D1.sb"));
776
787
                test(d1 != null);
777
788
                test(d1.sd1.Equals("D1.sd1"));
778
789
                test(d1.pd1 == b2);
779
 
                
 
790
 
780
791
                test(b2 != null);
781
792
                test(b2.ice_id().Equals("::Test::B")); // No factory, must be sliced
782
793
                test(b2.sb.Equals("D2.sb"));
788
799
            }
789
800
        }
790
801
        Console.Out.WriteLine("ok");
791
 
        
 
802
 
792
803
        Console.Out.Write("param ptr slicing with known first (AMI)... ");
793
804
        Console.Out.Flush();
794
805
        {
797
808
            cb.check();
798
809
        }
799
810
        Console.Out.WriteLine("ok");
800
 
        
 
811
 
801
812
        Console.Out.Write("param ptr slicing with unknown first... ");
802
813
        Console.Out.Flush();
803
814
        {
806
817
                B b2;
807
818
                B b1;
808
819
                testPrx.paramTest2(out b2, out b1);
809
 
                
 
820
 
810
821
                test(b1 != null);
811
822
                test(b1.ice_id().Equals("::Test::D1"));
812
823
                test(b1.sb.Equals("D1.sb"));
815
826
                test(d1 != null);
816
827
                test(d1.sd1.Equals("D1.sd1"));
817
828
                test(d1.pd1 == b2);
818
 
                
 
829
 
819
830
                test(b2 != null);
820
831
                test(b2.ice_id().Equals("::Test::B")); // No factory, must be sliced
821
832
                test(b2.sb.Equals("D2.sb"));
827
838
            }
828
839
        }
829
840
        Console.Out.WriteLine("ok");
830
 
        
 
841
 
831
842
        Console.Out.Write("param ptr slicing with unknown first (AMI)... ");
832
843
        Console.Out.Flush();
833
844
        {
836
847
            cb.check();
837
848
        }
838
849
        Console.Out.WriteLine("ok");
839
 
        
 
850
 
840
851
        Console.Out.Write("return value identity with known first... ");
841
852
        Console.Out.Flush();
842
853
        {
853
864
            }
854
865
        }
855
866
        Console.Out.WriteLine("ok");
856
 
        
 
867
 
857
868
        Console.Out.Write("return value identity with known first (AMI)... ");
858
869
        Console.Out.Flush();
859
870
        {
862
873
            cb.check();
863
874
        }
864
875
        Console.Out.WriteLine("ok");
865
 
        
 
876
 
866
877
        Console.Out.Write("return value identity with unknown first... ");
867
878
        Console.Out.Flush();
868
879
        {
879
890
            }
880
891
        }
881
892
        Console.Out.WriteLine("ok");
882
 
        
 
893
 
883
894
        Console.Out.Write("return value identity with unknown first (AMI)... ");
884
895
        Console.Out.Flush();
885
896
        {
888
899
            cb.check();
889
900
        }
890
901
        Console.Out.WriteLine("ok");
891
 
        
 
902
 
892
903
        Console.Out.Write("return value identity for input params known first... ");
893
904
        Console.Out.Flush();
894
905
        {
904
915
                d3.pd3 = d1;
905
916
                d1.pb = d3;
906
917
                d1.pd1 = d3;
907
 
                
 
918
 
908
919
                B b1 = testPrx.returnTest3(d1, d3);
909
 
                
 
920
 
910
921
                test(b1 != null);
911
922
                test(b1.sb.Equals("D1.sb"));
912
923
                test(b1.ice_id().Equals("::Test::D1"));
914
925
                test(p1 != null);
915
926
                test(p1.sd1.Equals("D1.sd1"));
916
927
                test(p1.pd1 == b1.pb);
917
 
                
 
928
 
918
929
                B b2 = b1.pb;
919
930
                test(b2 != null);
920
931
                test(b2.sb.Equals("D3.sb"));
929
940
                catch(InvalidCastException)
930
941
                {
931
942
                }
932
 
                
 
943
 
933
944
                test(b1 != d1);
934
945
                test(b1 != d3);
935
946
                test(b2 != d1);
941
952
            }
942
953
        }
943
954
        Console.Out.WriteLine("ok");
944
 
        
 
955
 
945
956
        Console.Out.Write("return value identity for input params known first (AMI)... ");
946
957
        Console.Out.Flush();
947
958
        {
955
966
            d3.pd3 = d1;
956
967
            d1.pb = d3;
957
968
            d1.pd1 = d3;
958
 
            
 
969
 
959
970
            AsyncCallback cb = new AsyncCallback();
960
971
            testPrx.begin_returnTest3(d1, d3).whenCompleted(cb.response_returnTest3, cb.exception);
961
972
            cb.check();
962
973
            B b1 = cb.rb;
963
 
            
 
974
 
964
975
            test(b1 != null);
965
976
            test(b1.sb.Equals("D1.sb"));
966
977
            test(b1.ice_id().Equals("::Test::D1"));
968
979
            test(p1 != null);
969
980
            test(p1.sd1.Equals("D1.sd1"));
970
981
            test(p1.pd1 == b1.pb);
971
 
            
 
982
 
972
983
            B b2 = b1.pb;
973
984
            test(b2 != null);
974
985
            test(b2.sb.Equals("D3.sb"));
983
994
            catch(InvalidCastException)
984
995
            {
985
996
            }
986
 
            
 
997
 
987
998
            test(b1 != d1);
988
999
            test(b1 != d3);
989
1000
            test(b2 != d1);
990
1001
            test(b2 != d3);
991
1002
        }
992
1003
        Console.Out.WriteLine("ok");
993
 
        
 
1004
 
994
1005
        Console.Out.Write("return value identity for input params unknown first... ");
995
1006
        Console.Out.Flush();
996
1007
        {
1006
1017
                d3.pd3 = d1;
1007
1018
                d1.pb = d3;
1008
1019
                d1.pd1 = d3;
1009
 
                
 
1020
 
1010
1021
                B b1 = testPrx.returnTest3(d3, d1);
1011
 
                
 
1022
 
1012
1023
                test(b1 != null);
1013
1024
                test(b1.sb.Equals("D3.sb"));
1014
1025
                test(b1.ice_id().Equals("::Test::B")); // Sliced by server
1015
 
                
 
1026
 
1016
1027
                try
1017
1028
                {
1018
1029
                    D3 p1 = (D3) b1;
1022
1033
                catch(InvalidCastException)
1023
1034
                {
1024
1035
                }
1025
 
                
 
1036
 
1026
1037
                B b2 = b1.pb;
1027
1038
                test(b2 != null);
1028
1039
                test(b2.sb.Equals("D1.sb"));
1032
1043
                test(p3 != null);
1033
1044
                test(p3.sd1.Equals("D1.sd1"));
1034
1045
                test(p3.pd1 == b1);
1035
 
                
 
1046
 
1036
1047
                test(b1 != d1);
1037
1048
                test(b1 != d3);
1038
1049
                test(b2 != d1);
1044
1055
            }
1045
1056
        }
1046
1057
        Console.Out.WriteLine("ok");
1047
 
        
 
1058
 
1048
1059
        Console.Out.Write("return value identity for input params unknown first (AMI)... ");
1049
1060
        Console.Out.Flush();
1050
1061
        {
1058
1069
            d3.pd3 = d1;
1059
1070
            d1.pb = d3;
1060
1071
            d1.pd1 = d3;
1061
 
            
 
1072
 
1062
1073
            AsyncCallback cb = new AsyncCallback();
1063
1074
            testPrx.begin_returnTest3(d3, d1).whenCompleted(cb.response_returnTest3, cb.exception);
1064
1075
            cb.check();
1065
1076
            B b1 = cb.rb;
1066
 
            
 
1077
 
1067
1078
            test(b1 != null);
1068
1079
            test(b1.sb.Equals("D3.sb"));
1069
1080
            test(b1.ice_id().Equals("::Test::B")); // Sliced by server
1070
 
            
 
1081
 
1071
1082
            try
1072
1083
            {
1073
1084
                D3 p1 = (D3) b1;
1077
1088
            catch(InvalidCastException)
1078
1089
            {
1079
1090
            }
1080
 
            
 
1091
 
1081
1092
            B b2 = b1.pb;
1082
1093
            test(b2 != null);
1083
1094
            test(b2.sb.Equals("D1.sb"));
1087
1098
            test(p3 != null);
1088
1099
            test(p3.sd1.Equals("D1.sd1"));
1089
1100
            test(p3.pd1 == b1);
1090
 
            
 
1101
 
1091
1102
            test(b1 != d1);
1092
1103
            test(b1 != d3);
1093
1104
            test(b2 != d1);
1094
1105
            test(b2 != d3);
1095
1106
        }
1096
1107
        Console.Out.WriteLine("ok");
1097
 
        
 
1108
 
1098
1109
        Console.Out.Write("remainder unmarshaling (3 instances)... ");
1099
1110
        Console.Out.Flush();
1100
1111
        {
1103
1114
                B p1;
1104
1115
                B p2;
1105
1116
                B ret = testPrx.paramTest3(out p1, out p2);
1106
 
                
 
1117
 
1107
1118
                test(p1 != null);
1108
1119
                test(p1.sb.Equals("D2.sb (p1 1)"));
1109
1120
                test(p1.pb == null);
1110
1121
                test(p1.ice_id().Equals("::Test::B"));
1111
 
                
 
1122
 
1112
1123
                test(p2 != null);
1113
1124
                test(p2.sb.Equals("D2.sb (p2 1)"));
1114
1125
                test(p2.pb == null);
1115
1126
                test(p2.ice_id().Equals("::Test::B"));
1116
 
                
 
1127
 
1117
1128
                test(ret != null);
1118
1129
                test(ret.sb.Equals("D1.sb (p2 2)"));
1119
1130
                test(ret.pb == null);
1125
1136
            }
1126
1137
        }
1127
1138
        Console.Out.WriteLine("ok");
1128
 
        
 
1139
 
1129
1140
        Console.Out.Write("remainder unmarshaling (3 instances) (AMI)... ");
1130
1141
        Console.Out.Flush();
1131
1142
        {
1134
1145
            cb.check();
1135
1146
        }
1136
1147
        Console.Out.WriteLine("ok");
1137
 
        
 
1148
 
1138
1149
        Console.Out.Write("remainder unmarshaling (4 instances)... ");
1139
1150
        Console.Out.Flush();
1140
1151
        {
1142
1153
            {
1143
1154
                B b;
1144
1155
                B ret = testPrx.paramTest4(out b);
1145
 
                
 
1156
 
1146
1157
                test(b != null);
1147
1158
                test(b.sb.Equals("D4.sb (1)"));
1148
1159
                test(b.pb == null);
1149
1160
                test(b.ice_id().Equals("::Test::B"));
1150
 
                
 
1161
 
1151
1162
                test(ret != null);
1152
1163
                test(ret.sb.Equals("B.sb (2)"));
1153
1164
                test(ret.pb == null);
1159
1170
            }
1160
1171
        }
1161
1172
        Console.Out.WriteLine("ok");
1162
 
        
 
1173
 
1163
1174
        Console.Out.Write("remainder unmarshaling (4 instances) (AMI)... ");
1164
1175
        Console.Out.Flush();
1165
1176
        {
1168
1179
            cb.check();
1169
1180
        }
1170
1181
        Console.Out.WriteLine("ok");
1171
 
        
 
1182
 
1172
1183
        Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as base... ");
1173
1184
        Console.Out.Flush();
1174
1185
        {
1177
1188
                B b1 = new B();
1178
1189
                b1.sb = "B.sb(1)";
1179
1190
                b1.pb = b1;
1180
 
                
 
1191
 
1181
1192
                D3 d3 = new D3();
1182
1193
                d3.sb = "D3.sb";
1183
1194
                d3.pb = d3;
1184
1195
                d3.sd3 = "D3.sd3";
1185
1196
                d3.pd3 = b1;
1186
 
                
 
1197
 
1187
1198
                B b2 = new B();
1188
1199
                b2.sb = "B.sb(2)";
1189
1200
                b2.pb = b1;
1190
 
                
 
1201
 
1191
1202
                B ret = testPrx.returnTest3(d3, b2);
1192
 
                
 
1203
 
1193
1204
                test(ret != null);
1194
1205
                test(ret.ice_id().Equals("::Test::B"));
1195
1206
                test(ret.sb.Equals("D3.sb"));
1201
1212
            }
1202
1213
        }
1203
1214
        Console.Out.WriteLine("ok");
1204
 
        
 
1215
 
1205
1216
        Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as base (AMI)... ");
1206
1217
        Console.Out.Flush();
1207
1218
        {
1208
1219
            B b1 = new B();
1209
1220
            b1.sb = "B.sb(1)";
1210
1221
            b1.pb = b1;
1211
 
            
 
1222
 
1212
1223
            D3 d3 = new D3();
1213
1224
            d3.sb = "D3.sb";
1214
1225
            d3.pb = d3;
1215
1226
            d3.sd3 = "D3.sd3";
1216
1227
            d3.pd3 = b1;
1217
 
            
 
1228
 
1218
1229
            B b2 = new B();
1219
1230
            b2.sb = "B.sb(2)";
1220
1231
            b2.pb = b1;
1221
 
            
 
1232
 
1222
1233
            AsyncCallback cb = new AsyncCallback();
1223
1234
            testPrx.begin_returnTest3(d3, b2).whenCompleted(cb.response_returnTest3, cb.exception);
1224
1235
            cb.check();
1225
1236
            B rv = cb.rb;
1226
 
            
 
1237
 
1227
1238
            test(rv != null);
1228
1239
            test(rv.ice_id().Equals("::Test::B"));
1229
1240
            test(rv.sb.Equals("D3.sb"));
1230
1241
            test(rv.pb == rv);
1231
1242
        }
1232
1243
        Console.Out.WriteLine("ok");
1233
 
        
 
1244
 
1234
1245
        Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as derived... ");
1235
1246
        Console.Out.Flush();
1236
1247
        {
1240
1251
                d11.sb = "D1.sb(1)";
1241
1252
                d11.pb = d11;
1242
1253
                d11.sd1 = "D1.sd1(1)";
1243
 
                
 
1254
 
1244
1255
                D3 d3 = new D3();
1245
1256
                d3.sb = "D3.sb";
1246
1257
                d3.pb = d3;
1247
1258
                d3.sd3 = "D3.sd3";
1248
1259
                d3.pd3 = d11;
1249
 
                
 
1260
 
1250
1261
                D1 d12 = new D1();
1251
1262
                d12.sb = "D1.sb(2)";
1252
1263
                d12.pb = d12;
1253
1264
                d12.sd1 = "D1.sd1(2)";
1254
1265
                d12.pd1 = d11;
1255
 
                
 
1266
 
1256
1267
                B ret = testPrx.returnTest3(d3, d12);
1257
1268
                test(ret != null);
1258
1269
                test(ret.ice_id().Equals("::Test::B"));
1265
1276
            }
1266
1277
        }
1267
1278
        Console.Out.WriteLine("ok");
1268
 
        
 
1279
 
1269
1280
        Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as derived (AMI)... ");
1270
1281
        Console.Out.Flush();
1271
1282
        {
1273
1284
            d11.sb = "D1.sb(1)";
1274
1285
            d11.pb = d11;
1275
1286
            d11.sd1 = "D1.sd1(1)";
1276
 
            
 
1287
 
1277
1288
            D3 d3 = new D3();
1278
1289
            d3.sb = "D3.sb";
1279
1290
            d3.pb = d3;
1280
1291
            d3.sd3 = "D3.sd3";
1281
1292
            d3.pd3 = d11;
1282
 
            
 
1293
 
1283
1294
            D1 d12 = new D1();
1284
1295
            d12.sb = "D1.sb(2)";
1285
1296
            d12.pb = d12;
1286
1297
            d12.sd1 = "D1.sd1(2)";
1287
1298
            d12.pd1 = d11;
1288
 
            
 
1299
 
1289
1300
            AsyncCallback cb = new AsyncCallback();
1290
1301
            testPrx.begin_returnTest3(d3, d12).whenCompleted(cb.response_returnTest3, cb.exception);
1291
1302
            cb.check();
1292
1303
            B rv = cb.rb;
1293
 
            
 
1304
 
1294
1305
            test(rv != null);
1295
1306
            test(rv.ice_id().Equals("::Test::B"));
1296
1307
            test(rv.sb.Equals("D3.sb"));
1297
1308
            test(rv.pb == rv);
1298
1309
        }
1299
1310
        Console.Out.WriteLine("ok");
1300
 
        
 
1311
 
1301
1312
        Console.Out.Write("sequence slicing... ");
1302
1313
        Console.Out.Flush();
1303
1314
        {
1308
1319
                    B ss1b = new B();
1309
1320
                    ss1b.sb = "B.sb";
1310
1321
                    ss1b.pb = ss1b;
1311
 
                    
 
1322
 
1312
1323
                    D1 ss1d1 = new D1();
1313
1324
                    ss1d1.sb = "D1.sb";
1314
1325
                    ss1d1.sd1 = "D1.sd1";
1315
1326
                    ss1d1.pb = ss1b;
1316
 
                    
 
1327
 
1317
1328
                    D3 ss1d3 = new D3();
1318
1329
                    ss1d3.sb = "D3.sb";
1319
1330
                    ss1d3.sd3 = "D3.sd3";
1320
1331
                    ss1d3.pb = ss1b;
1321
 
                    
 
1332
 
1322
1333
                    B ss2b = new B();
1323
1334
                    ss2b.sb = "B.sb";
1324
1335
                    ss2b.pb = ss1b;
1325
 
                    
 
1336
 
1326
1337
                    D1 ss2d1 = new D1();
1327
1338
                    ss2d1.sb = "D1.sb";
1328
1339
                    ss2d1.sd1 = "D1.sd1";
1329
1340
                    ss2d1.pb = ss2b;
1330
 
                    
 
1341
 
1331
1342
                    D3 ss2d3 = new D3();
1332
1343
                    ss2d3.sb = "D3.sb";
1333
1344
                    ss2d3.sd3 = "D3.sd3";
1334
1345
                    ss2d3.pb = ss2b;
1335
 
                    
 
1346
 
1336
1347
                    ss1d1.pd1 = ss2b;
1337
1348
                    ss1d3.pd3 = ss2d1;
1338
 
                    
 
1349
 
1339
1350
                    ss2d1.pd1 = ss1d3;
1340
1351
                    ss2d3.pd3 = ss1d1;
1341
 
                    
 
1352
 
1342
1353
                    SS1 ss1 = new SS1();
1343
1354
                    ss1.s = new BSeq(3);
1344
1355
                    ss1.s.Add(ss1b);
1345
1356
                    ss1.s.Add(ss1d1);
1346
1357
                    ss1.s.Add(ss1d3);
1347
 
                    
 
1358
 
1348
1359
                    SS2 ss2 = new SS2();
1349
1360
                    ss2.s = new BSeq(3);
1350
1361
                    ss2.s.Add(ss2b);
1351
1362
                    ss2.s.Add(ss2d1);
1352
1363
                    ss2.s.Add(ss2d3);
1353
 
                    
 
1364
 
1354
1365
                    ss = testPrx.sequenceTest(ss1, ss2);
1355
1366
                }
1356
 
                
 
1367
 
1357
1368
                test(ss.c1 != null);
1358
1369
                B ss1b2 = ss.c1.s[0];
1359
1370
                B ss1d2 = ss.c1.s[1];
1360
1371
                test(ss.c2 != null);
1361
1372
                B ss1d4 = ss.c1.s[2];
1362
 
                
 
1373
 
1363
1374
                test(ss.c2 != null);
1364
1375
                B ss2b2 = ss.c2.s[0];
1365
1376
                B ss2d2 = ss.c2.s[1];
1366
1377
                B ss2d4 = ss.c2.s[2];
1367
 
                
 
1378
 
1368
1379
                test(ss1b2.pb == ss1b2);
1369
1380
                test(ss1d2.pb == ss1b2);
1370
1381
                test(ss1d4.pb == ss1b2);
1371
 
                
 
1382
 
1372
1383
                test(ss2b2.pb == ss1b2);
1373
1384
                test(ss2d2.pb == ss2b2);
1374
1385
                test(ss2d4.pb == ss2b2);
1375
 
                
 
1386
 
1376
1387
                test(ss1b2.ice_id().Equals("::Test::B"));
1377
1388
                test(ss1d2.ice_id().Equals("::Test::D1"));
1378
1389
                test(ss1d4.ice_id().Equals("::Test::B"));
1379
 
                
 
1390
 
1380
1391
                test(ss2b2.ice_id().Equals("::Test::B"));
1381
1392
                test(ss2d2.ice_id().Equals("::Test::D1"));
1382
1393
                test(ss2d4.ice_id().Equals("::Test::B"));
1387
1398
            }
1388
1399
        }
1389
1400
        Console.Out.WriteLine("ok");
1390
 
        
 
1401
 
1391
1402
        Console.Out.Write("sequence slicing (AMI)... ");
1392
1403
        Console.Out.Flush();
1393
1404
        {
1396
1407
                B ss1b = new B();
1397
1408
                ss1b.sb = "B.sb";
1398
1409
                ss1b.pb = ss1b;
1399
 
                
 
1410
 
1400
1411
                D1 ss1d1 = new D1();
1401
1412
                ss1d1.sb = "D1.sb";
1402
1413
                ss1d1.sd1 = "D1.sd1";
1403
1414
                ss1d1.pb = ss1b;
1404
 
                
 
1415
 
1405
1416
                D3 ss1d3 = new D3();
1406
1417
                ss1d3.sb = "D3.sb";
1407
1418
                ss1d3.sd3 = "D3.sd3";
1408
1419
                ss1d3.pb = ss1b;
1409
 
                
 
1420
 
1410
1421
                B ss2b = new B();
1411
1422
                ss2b.sb = "B.sb";
1412
1423
                ss2b.pb = ss1b;
1413
 
                
 
1424
 
1414
1425
                D1 ss2d1 = new D1();
1415
1426
                ss2d1.sb = "D1.sb";
1416
1427
                ss2d1.sd1 = "D1.sd1";
1417
1428
                ss2d1.pb = ss2b;
1418
 
                
 
1429
 
1419
1430
                D3 ss2d3 = new D3();
1420
1431
                ss2d3.sb = "D3.sb";
1421
1432
                ss2d3.sd3 = "D3.sd3";
1422
1433
                ss2d3.pb = ss2b;
1423
 
                
 
1434
 
1424
1435
                ss1d1.pd1 = ss2b;
1425
1436
                ss1d3.pd3 = ss2d1;
1426
 
                
 
1437
 
1427
1438
                ss2d1.pd1 = ss1d3;
1428
1439
                ss2d3.pd3 = ss1d1;
1429
 
                
 
1440
 
1430
1441
                SS1 ss1 = new SS1();
1431
1442
                ss1.s = new BSeq();
1432
1443
                ss1.s.Add(ss1b);
1433
1444
                ss1.s.Add(ss1d1);
1434
1445
                ss1.s.Add(ss1d3);
1435
 
                
 
1446
 
1436
1447
                SS2 ss2 = new SS2();
1437
1448
                ss2.s = new BSeq();
1438
1449
                ss2.s.Add(ss2b);
1439
1450
                ss2.s.Add(ss2d1);
1440
1451
                ss2.s.Add(ss2d3);
1441
 
                
 
1452
 
1442
1453
                AsyncCallback cb = new AsyncCallback();
1443
1454
                testPrx.begin_sequenceTest(ss1, ss2).whenCompleted(cb.response_sequenceTest, cb.exception);
1444
1455
                cb.check();
1449
1460
            B ss1d5 = ss.c1.s[1];
1450
1461
            test(ss.c2 != null);
1451
1462
            B ss1d6 = ss.c1.s[2];
1452
 
            
 
1463
 
1453
1464
            test(ss.c2 != null);
1454
1465
            B ss2b3 = ss.c2.s[0];
1455
1466
            B ss2d5 = ss.c2.s[1];
1456
1467
            B ss2d6 = ss.c2.s[2];
1457
 
            
 
1468
 
1458
1469
            test(ss1b3.pb == ss1b3);
1459
1470
            test(ss1d6.pb == ss1b3);
1460
1471
            test(ss1d6.pb == ss1b3);
1461
 
            
 
1472
 
1462
1473
            test(ss2b3.pb == ss1b3);
1463
1474
            test(ss2d6.pb == ss2b3);
1464
1475
            test(ss2d6.pb == ss2b3);
1465
 
            
 
1476
 
1466
1477
            test(ss1b3.ice_id().Equals("::Test::B"));
1467
1478
            test(ss1d5.ice_id().Equals("::Test::D1"));
1468
1479
            test(ss1d6.ice_id().Equals("::Test::B"));
1469
 
            
 
1480
 
1470
1481
            test(ss2b3.ice_id().Equals("::Test::B"));
1471
1482
            test(ss2d5.ice_id().Equals("::Test::D1"));
1472
1483
            test(ss2d6.ice_id().Equals("::Test::B"));
1473
1484
        }
1474
1485
        Console.Out.WriteLine("ok");
1475
 
        
 
1486
 
1476
1487
        Console.Out.Write("dictionary slicing... ");
1477
1488
        Console.Out.Flush();
1478
1489
        {
1491
1502
                    d1.sd1 = s;
1492
1503
                    bin[i] = d1;
1493
1504
                }
1494
 
                
 
1505
 
1495
1506
                ret = testPrx.dictionaryTest(bin, out bout);
1496
 
                
 
1507
 
1497
1508
                test(bout.Count == 10);
1498
1509
                for(i = 0; i < 10; ++i)
1499
1510
                {
1506
1517
                    test(b.pb.sb.Equals(s));
1507
1518
                    test(b.pb.pb == b.pb);
1508
1519
                }
1509
 
                
 
1520
 
1510
1521
                test(ret.Count == 10);
1511
1522
                for(i = 0; i < 10; ++i)
1512
1523
                {
1527
1538
            }
1528
1539
        }
1529
1540
        Console.Out.WriteLine("ok");
1530
 
        
 
1541
 
1531
1542
        Console.Out.Write("dictionary slicing (AMI)... ");
1532
1543
        Console.Out.Flush();
1533
1544
        {
1544
1555
                d1.sd1 = s;
1545
1556
                bin[i] = d1;
1546
1557
            }
1547
 
            
 
1558
 
1548
1559
            AsyncCallback cb = new AsyncCallback();
1549
1560
            testPrx.begin_dictionaryTest(bin).whenCompleted(cb.response_dictionaryTest, cb.exception);
1550
1561
            cb.check();
1551
1562
            bout = cb.obdict;
1552
1563
            rv = cb.rbdict;
1553
 
            
 
1564
 
1554
1565
            test(bout.Count == 10);
1555
1566
            for(i = 0; i < 10; ++i)
1556
1567
            {
1563
1574
                test(b.pb.sb.Equals(s));
1564
1575
                test(b.pb.pb == b.pb);
1565
1576
            }
1566
 
            
 
1577
 
1567
1578
            test(rv.Count == 10);
1568
1579
            for(i = 0; i < 10; ++i)
1569
1580
            {
1579
1590
            }
1580
1591
        }
1581
1592
        Console.Out.WriteLine("ok");
1582
 
        
 
1593
 
1583
1594
        Console.Out.Write("base exception thrown as base exception... ");
1584
1595
        Console.Out.Flush();
1585
1596
        {
1602
1613
            }
1603
1614
        }
1604
1615
        Console.Out.WriteLine("ok");
1605
 
        
 
1616
 
1606
1617
        Console.Out.Write("base exception thrown as base exception (AMI)... ");
1607
1618
        Console.Out.Flush();
1608
1619
        {
1611
1622
            cb.check();
1612
1623
        }
1613
1624
        Console.Out.WriteLine("ok");
1614
 
        
 
1625
 
1615
1626
        Console.Out.Write("derived exception thrown as base exception... ");
1616
1627
        Console.Out.Flush();
1617
1628
        {
1640
1651
            }
1641
1652
        }
1642
1653
        Console.Out.WriteLine("ok");
1643
 
        
 
1654
 
1644
1655
        Console.Out.Write("derived exception thrown as base exception (AMI)... ");
1645
1656
        Console.Out.Flush();
1646
1657
        {
1649
1660
            cb.check();
1650
1661
        }
1651
1662
        Console.Out.WriteLine("ok");
1652
 
        
 
1663
 
1653
1664
        Console.Out.Write("derived exception thrown as derived exception... ");
1654
1665
        Console.Out.Flush();
1655
1666
        {
1678
1689
            }
1679
1690
        }
1680
1691
        Console.Out.WriteLine("ok");
1681
 
        
 
1692
 
1682
1693
        Console.Out.Write("derived exception thrown as derived exception (AMI)... ");
1683
1694
        Console.Out.Flush();
1684
1695
        {
1687
1698
            cb.check();
1688
1699
        }
1689
1700
        Console.Out.WriteLine("ok");
1690
 
        
 
1701
 
1691
1702
        Console.Out.Write("unknown derived exception thrown as base exception... ");
1692
1703
        Console.Out.Flush();
1693
1704
        {
1710
1721
            }
1711
1722
        }
1712
1723
        Console.Out.WriteLine("ok");
1713
 
        
 
1724
 
1714
1725
        Console.Out.Write("unknown derived exception thrown as base exception (AMI)... ");
1715
1726
        Console.Out.Flush();
1716
1727
        {
1720
1731
            cb.check();
1721
1732
        }
1722
1733
        Console.Out.WriteLine("ok");
1723
 
        
 
1734
 
1724
1735
        Console.Out.Write("forward-declared class... ");
1725
1736
        Console.Out.Flush();
1726
1737
        {
1736
1747
            }
1737
1748
        }
1738
1749
        Console.Out.WriteLine("ok");
1739
 
        
 
1750
 
1740
1751
        Console.Out.Write("forward-declared class (AMI)... ");
1741
1752
        Console.Out.Flush();
1742
1753
        {
1745
1756
            cb.check();
1746
1757
        }
1747
1758
        Console.Out.WriteLine("ok");
1748
 
        
 
1759
 
1749
1760
        return testPrx;
1750
1761
    }
1751
1762
}