xref: /aoo4110/main/idlc/test/parser/published.tests (revision b1cdbd2c)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22EXPECT SUCCESS "published.tests 1":
23published enum Enum { VALUE };
24published struct Struct1 { long member; };
25published struct Struct2<T> { T member; };
26published exception E1 {};
27published interface I1 {};
28published typedef long Typedef;
29published const long Constant = 1;
30published constants Constants { const long Constant = 1; };
31published service Service1: I1 {};
32published service Service2 { interface I1; };
33published singleton Singleton1: I1;
34published singleton Singleton2 { service Service2; };
35
36
37EXPECT FAILURE "published.tests 2":
38constants Constants { published const long C = 1; };
39
40
41EXPECT FAILURE "published.tests 3":
42published constants Constants { published const long C = 1; };
43
44
45EXPECT FAILURE "published.tests 4":
46published module m {};
47
48
49EXPECT SUCCESS "published.tests 5":
50interface I1;
51interface I1 {};
52
53
54EXPECT SUCCESS "published.tests 6":
55interface I1;
56published interface I1 {};
57
58
59EXPECT FAILURE "published.tests 7":
60published interface I1;
61interface I1 {};
62
63
64EXPECT SUCCESS "published.tests 8":
65published interface I1;
66published interface I1 {};
67
68
69EXPECT SUCCESS "published.tests 9":
70struct S1 { long m1; };
71struct S2: S1 { long m2; };
72
73
74EXPECT FAILURE "published.tests 10":
75struct S1 { long m1; };
76published struct S2: S1 { long m2; };
77
78
79EXPECT SUCCESS "published.tests 11":
80published struct S1 { long m1; };
81struct S2: S1 { long m2; };
82
83
84EXPECT SUCCESS "published.tests 12":
85published struct S1 { long m1; };
86published struct S2: S1 { long m2; };
87
88
89EXPECT SUCCESS "published.tests 13":
90enum E { V };
91struct S1<T> { T m1; };
92struct S2 { S1<E> m2; };
93
94
95EXPECT FAILURE "published.tests 14":
96enum E { V };
97struct S1<T> { T m1; };
98published struct S2 { S1<E> m2; };
99
100
101EXPECT SUCCESS "published.tests 15":
102enum E { V };
103published struct S1<T> { T m1; };
104struct S2 { S1<E> m2; };
105
106
107EXPECT FAILURE "published.tests 16":
108enum E { V };
109published struct S1<T> { T m1; };
110published struct S2 { S1<E> m2; };
111
112
113EXPECT SUCCESS "published.tests 17":
114published enum E { V };
115struct S1<T> { T m1; };
116struct S2 { S1<E> m2; };
117
118
119EXPECT FAILURE "published.tests 18":
120published enum E { V };
121struct S1<T> { T m1; };
122published struct S2 { S1<E> m2; };
123
124
125EXPECT SUCCESS "published.tests 19":
126published enum E { V };
127published struct S1<T> { T m1; };
128struct S2 { S1<E> m2; };
129
130
131EXPECT SUCCESS "published.tests 20":
132published enum E { V };
133published struct S1<T> { T m1; };
134published struct S2 { S1<E> m2; };
135
136
137EXPECT SUCCESS "published.tests 21":
138module com { module sun { module star { module uno {
139exception Exception {};
140exception E2: Exception {};
141}; }; }; };
142
143
144EXPECT FAILURE "published.tests 22":
145module com { module sun { module star { module uno {
146exception Exception {};
147published exception E2: Exception {};
148}; }; }; };
149
150
151EXPECT SUCCESS "published.tests 23":
152module com { module sun { module star { module uno {
153published exception Exception {};
154exception E2: Exception {};
155}; }; }; };
156
157
158EXPECT SUCCESS "published.tests 24":
159module com { module sun { module star { module uno {
160published exception Exception {};
161published exception E2: Exception {};
162}; }; }; };
163
164
165EXPECT SUCCESS "published.tests 25":
166enum E { V };
167module com { module sun { module star { module uno {
168exception Exception { E m; };
169}; }; }; };
170
171
172EXPECT FAILURE "published.tests 26":
173enum E { V };
174module com { module sun { module star { module uno {
175published exception Exception { E m; };
176}; }; }; };
177
178
179EXPECT SUCCESS "published.tests 27":
180published enum E { V };
181module com { module sun { module star { module uno {
182exception Exception { E m; };
183}; }; }; };
184
185
186EXPECT SUCCESS "published.tests 28":
187published enum E { V };
188module com { module sun { module star { module uno {
189published exception Exception { E m; };
190}; }; }; };
191
192
193EXPECT SUCCESS "published.tests 29":
194interface I1 {};
195interface I2: I1 {};
196
197
198EXPECT FAILURE "published.tests 30":
199interface I1 {};
200published interface I2: I1 {};
201
202
203EXPECT SUCCESS "published.tests 31":
204published interface I1 {};
205interface I2: I1 {};
206
207
208EXPECT SUCCESS "published.tests 32":
209published interface I1 {};
210published interface I2: I1 {};
211
212
213EXPECT SUCCESS "published.tests 33":
214enum E { V };
215interface I1 { [attribute] E m; };
216
217
218EXPECT FAILURE "published.tests 34":
219enum E { V };
220published interface I1 { [attribute] E m; };
221
222
223EXPECT SUCCESS "published.tests 35":
224published enum E { V };
225interface I1 { [attribute] E m; };
226
227
228EXPECT SUCCESS "published.tests 36":
229published enum E { V };
230published interface I1 { [attribute] E m; };
231
232
233EXPECT SUCCESS "published.tests 36a.1":
234module com { module sun { module star { module uno {
235exception Exception {};
236interface I1 { [attribute] long m { get raises (Exception); }; };
237}; }; }; };
238
239
240EXPECT FAILURE "published.tests 36a.2":
241module com { module sun { module star { module uno {
242exception Exception {};
243published interface I1 {
244	[attribute] long m { get raises (Exception); }; };
245}; }; }; };
246
247
248EXPECT SUCCESS "published.tests 36a.3":
249module com { module sun { module star { module uno {
250published exception Exception {};
251interface I1 { [attribute] long m { get raises (Exception); }; };
252}; }; }; };
253
254
255EXPECT SUCCESS "published.tests 36a.4":
256module com { module sun { module star { module uno {
257published exception Exception {};
258published interface I1 {
259	 [attribute] long m { get raises (Exception); }; };
260}; }; }; };
261
262
263EXPECT SUCCESS "published.tests 37":
264enum E { V };
265interface I1 { E f(); };
266
267
268EXPECT FAILURE "published.tests 38":
269enum E { V };
270published interface I1 { E f(); };
271
272
273EXPECT SUCCESS "published.tests 39":
274published enum E { V };
275interface I1 { E f(); };
276
277
278EXPECT SUCCESS "published.tests 40":
279published enum E { V };
280published interface I1 { E f(); };
281
282
283EXPECT SUCCESS "published.tests 41":
284enum E { V };
285interface I1 { void f([in] E p); };
286
287
288EXPECT FAILURE "published.tests 42":
289enum E { V };
290published interface I1 { void f([in] E p); };
291
292
293EXPECT SUCCESS "published.tests 43":
294published enum E { V };
295interface I1 { void f([in] E p); };
296
297
298EXPECT SUCCESS "published.tests 44":
299published enum E { V };
300published interface I1 { void f([in] E p); };
301
302
303EXPECT SUCCESS "published.tests 45":
304module com { module sun { module star { module uno {
305exception Exception {};
306interface I1 { void f() raises (Exception); };
307}; }; }; };
308
309
310EXPECT FAILURE "published.tests 46":
311module com { module sun { module star { module uno {
312exception Exception {};
313published interface I1 { void f() raises (Exception); };
314}; }; }; };
315
316
317EXPECT SUCCESS "published.tests 47":
318module com { module sun { module star { module uno {
319published exception Exception {};
320interface I1 { void f() raises (Exception); };
321}; }; }; };
322
323
324EXPECT SUCCESS "published.tests 48":
325module com { module sun { module star { module uno {
326published exception Exception {};
327published interface I1 { void f() raises (Exception); };
328}; }; }; };
329
330
331EXPECT SUCCESS "published.tests 49":
332interface I1 {};
333interface I2 { interface I1; };
334
335
336EXPECT FAILURE "published.tests 50":
337interface I1 {};
338published interface I2 { interface I1; };
339
340
341EXPECT SUCCESS "published.tests 51":
342published interface I1 {};
343interface I2 { interface I1; };
344
345
346EXPECT SUCCESS "published.tests 52":
347published interface I1 {};
348published interface I2 { interface I1; };
349
350
351EXPECT SUCCESS "published.tests 57":
352enum E { V };
353typedef E T;
354
355
356EXPECT FAILURE "published.tests 58":
357enum E { V };
358published typedef E T;
359
360
361EXPECT SUCCESS "published.tests 59":
362published enum E { V };
363typedef E T;
364
365
366EXPECT SUCCESS "published.tests 60":
367published enum E { V };
368published typedef E T;
369
370
371EXPECT SUCCESS "published.tests 61":
372enum E { V };
373typedef E T;
374struct S { T m; };
375
376
377EXPECT FAILURE "published.tests 62":
378enum E { V };
379typedef E T;
380published struct S { T m; };
381
382
383EXPECT FAILURE "published.tests 63":
384enum E { V };
385published typedef E T;
386struct S { T m; };
387
388
389EXPECT FAILURE "published.tests 64":
390enum E { V };
391published typedef E T;
392published struct S { T m; };
393
394
395EXPECT SUCCESS "published.tests 65":
396published enum E { V };
397typedef E T;
398struct S { T m; };
399
400
401EXPECT FAILURE "published.tests 66":
402published enum E { V };
403typedef E T;
404published struct S { T m; };
405
406
407EXPECT SUCCESS "published.tests 67":
408published enum E { V };
409published typedef E T;
410struct S { T m; };
411
412
413EXPECT SUCCESS "published.tests 68":
414published enum E { V };
415published typedef E T;
416published struct S { T m; };
417
418
419EXPECT SUCCESS "published.tests 69":
420const long C1 = 1;
421const long C2 = C1 + 1;
422
423
424EXPECT FAILURE "published.tests 70":
425const long C1 = 1;
426published const long C2 = C1 + 1;
427
428
429EXPECT SUCCESS "published.tests 71":
430published const long C1 = 1;
431const long C2 = C1 + 1;
432
433
434EXPECT SUCCESS "published.tests 72":
435published const long C1 = 1;
436published const long C2 = C1 + 1;
437
438
439EXPECT SUCCESS "published.tests 73":
440constants Cs {
441	const long C1 = 1;
442	const long C2 = C1 + 1;
443};
444
445
446EXPECT SUCCESS "published.tests 74":
447published constants Cs {
448	const long C1 = 1;
449	const long C2 = C1 + 1;
450};
451
452
453EXPECT SUCCESS "published.tests 75":
454constants Cs { const long C1 = 1; };
455const long C2 = Cs::C1 + 1;
456
457
458EXPECT FAILURE "published.tests 76":
459constants Cs { const long C1 = 1; };
460published const long C2 = Cs::C1 + 1;
461
462
463EXPECT SUCCESS "published.tests 77":
464published constants Cs { const long C1 = 1; };
465const long C2 = Cs::C1 + 1;
466
467
468EXPECT SUCCESS "published.tests 78":
469published constants Cs { const long C1 = 1; };
470published const long C2 = Cs::C1 + 1;
471
472
473EXPECT SUCCESS "published.tests 79":
474const long C1 = 1;
475constants Cs { const long C2 = C1 + 1; };
476
477
478EXPECT FAILURE "published.tests 80":
479const long C1 = 1;
480published constants Cs { const long C2 = C1 + 1; };
481
482
483EXPECT SUCCESS "published.tests 81":
484published const long C1 = 1;
485constants Cs { const long C2 = C1 + 1; };
486
487
488EXPECT SUCCESS "published.tests 82":
489published const long C1 = 1;
490published constants Cs { const long C2 = C1 + 1; };
491
492
493EXPECT SUCCESS "published.tests 83":
494constants Cs1 { const long C1 = 1; };
495constants Cs2 { const long C2 = Cs1::C1 + 1; };
496
497
498EXPECT FAILURE "published.tests 84":
499constants Cs1 { const long C1 = 1; };
500published constants Cs2 { const long C2 = Cs1::C1 + 1; };
501
502
503EXPECT SUCCESS "published.tests 85":
504published constants Cs1 { const long C1 = 1; };
505constants Cs2 { const long C2 = Cs1::C1 + 1; };
506
507
508EXPECT SUCCESS "published.tests 86":
509published constants Cs1 { const long C1 = 1; };
510published constants Cs2 { const long C2 = Cs1::C1 + 1; };
511
512
513EXPECT SUCCESS "published.tests 87":
514typedef long T;
515const T C = 1;
516
517
518EXPECT FAILURE "published.tests 88":
519typedef long T;
520published const T C = 1;
521
522
523EXPECT SUCCESS "published.tests 89":
524published typedef long T;
525const T C = 1;
526
527
528EXPECT SUCCESS "published.tests 90":
529published typedef long T;
530published const T C = 1;
531
532
533EXPECT SUCCESS "published.tests 91":
534service S1 {};
535service S2 { service S1; };
536
537
538EXPECT FAILURE "published.tests 92":
539service S1 {};
540published service S2 { service S1; };
541
542
543EXPECT SUCCESS "published.tests 93":
544published service S1 {};
545service S2 { service S1; };
546
547
548EXPECT SUCCESS "published.tests 94":
549published service S1 {};
550published service S2 { service S1; };
551
552
553EXPECT SUCCESS "published.tests 95":
554interface I1 {};
555service S { interface I1; };
556
557
558EXPECT FAILURE "published.tests 96":
559interface I1 {};
560published service S { interface I1; };
561
562
563EXPECT SUCCESS "published.tests 97":
564published interface I1 {};
565service S { interface I1; };
566
567
568EXPECT SUCCESS "published.tests 98":
569published interface I1 {};
570published service S { interface I1; };
571
572
573EXPECT SUCCESS "published.tests 99":
574interface I1 {};
575service S: I1;
576
577
578EXPECT FAILURE "published.tests 100":
579interface I1 {};
580published service S: I1;
581
582
583EXPECT SUCCESS "published.tests 101":
584published interface I1 {};
585service S: I1;
586
587
588EXPECT SUCCESS "published.tests 102":
589published interface I1 {};
590published service S: I1;
591
592
593EXPECT SUCCESS "published.tests 103":
594enum E { V };
595interface I1 {};
596service S: I1 {
597	f([in] E p);
598};
599
600
601EXPECT FAILURE "published.tests 104":
602enum E { V };
603published interface I1 {};
604published service S: I1 {
605	f([in] E p);
606};
607
608
609EXPECT SUCCESS "published.tests 105":
610published enum E { V };
611interface I1 {};
612service S: I1 {
613	f([in] E p);
614};
615
616
617EXPECT SUCCESS "published.tests 106":
618published enum E { V };
619published interface I1 {};
620published service S: I1 {
621	f([in] E p);
622};
623
624
625EXPECT SUCCESS "published.tests 107":
626module com { module sun { module star { module uno {
627exception Exception {};
628interface I1 {};
629service S: I1 {
630	f() raises (Exception);
631};
632}; }; }; };
633
634
635EXPECT FAILURE "published.tests 108":
636module com { module sun { module star { module uno {
637exception Exception {};
638published interface I1 {};
639published service S: I1 {
640	f() raises (Exception);
641};
642}; }; }; };
643
644
645EXPECT SUCCESS "published.tests 109":
646module com { module sun { module star { module uno {
647published exception Exception {};
648interface I1 {};
649service S: I1 {
650	f() raises (Exception);
651};
652}; }; }; };
653
654
655EXPECT SUCCESS "published.tests 110":
656module com { module sun { module star { module uno {
657published exception Exception {};
658published interface I1 {};
659published service S: I1 {
660	f() raises (Exception);
661};
662}; }; }; };
663
664
665EXPECT SUCCESS "published.tests 111":
666service S1 {};
667singleton S2 { service S1; };
668
669
670EXPECT FAILURE "published.tests 112":
671service S1 {};
672published singleton S2 { service S1; };
673
674
675EXPECT SUCCESS "published.tests 113":
676published service S1 {};
677singleton S2 { service S1; };
678
679
680EXPECT SUCCESS "published.tests 114":
681published service S1 {};
682published singleton S2 { service S1; };
683
684
685EXPECT SUCCESS "published.tests 115":
686interface I1 {};
687singleton S: I1;
688
689
690EXPECT FAILURE "published.tests 116":
691interface I1 {};
692published singleton S: I1;
693
694
695EXPECT SUCCESS "published.tests 117":
696published interface I1 {};
697singleton S: I1;
698
699
700EXPECT SUCCESS "published.tests 118":
701published interface I1 {};
702published singleton S: I1;
703