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