1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: published.tests,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 EXPECT SUCCESS "published.tests 1":
33 published enum Enum { VALUE };
34 published struct Struct1 { long member; };
35 published struct Struct2<T> { T member; };
36 published exception E1 {};
37 published interface I1 {};
38 published typedef long Typedef;
39 published const long Constant = 1;
40 published constants Constants { const long Constant = 1; };
41 published service Service1: I1 {};
42 published service Service2 { interface I1; };
43 published singleton Singleton1: I1;
44 published singleton Singleton2 { service Service2; };
47 EXPECT FAILURE "published.tests 2":
48 constants Constants { published const long C = 1; };
51 EXPECT FAILURE "published.tests 3":
52 published constants Constants { published const long C = 1; };
55 EXPECT FAILURE "published.tests 4":
56 published module m {};
59 EXPECT SUCCESS "published.tests 5":
64 EXPECT SUCCESS "published.tests 6":
66 published interface I1 {};
69 EXPECT FAILURE "published.tests 7":
70 published interface I1;
74 EXPECT SUCCESS "published.tests 8":
75 published interface I1;
76 published interface I1 {};
79 EXPECT SUCCESS "published.tests 9":
80 struct S1 { long m1; };
81 struct S2: S1 { long m2; };
84 EXPECT FAILURE "published.tests 10":
85 struct S1 { long m1; };
86 published struct S2: S1 { long m2; };
89 EXPECT SUCCESS "published.tests 11":
90 published struct S1 { long m1; };
91 struct S2: S1 { long m2; };
94 EXPECT SUCCESS "published.tests 12":
95 published struct S1 { long m1; };
96 published struct S2: S1 { long m2; };
99 EXPECT SUCCESS "published.tests 13":
101 struct S1<T> { T m1; };
102 struct S2 { S1<E> m2; };
105 EXPECT FAILURE "published.tests 14":
107 struct S1<T> { T m1; };
108 published struct S2 { S1<E> m2; };
111 EXPECT SUCCESS "published.tests 15":
113 published struct S1<T> { T m1; };
114 struct S2 { S1<E> m2; };
117 EXPECT FAILURE "published.tests 16":
119 published struct S1<T> { T m1; };
120 published struct S2 { S1<E> m2; };
123 EXPECT SUCCESS "published.tests 17":
124 published enum E { V };
125 struct S1<T> { T m1; };
126 struct S2 { S1<E> m2; };
129 EXPECT FAILURE "published.tests 18":
130 published enum E { V };
131 struct S1<T> { T m1; };
132 published struct S2 { S1<E> m2; };
135 EXPECT SUCCESS "published.tests 19":
136 published enum E { V };
137 published struct S1<T> { T m1; };
138 struct S2 { S1<E> m2; };
141 EXPECT SUCCESS "published.tests 20":
142 published enum E { V };
143 published struct S1<T> { T m1; };
144 published struct S2 { S1<E> m2; };
147 EXPECT SUCCESS "published.tests 21":
148 module com { module sun { module star { module uno {
149 exception Exception {};
150 exception E2: Exception {};
154 EXPECT FAILURE "published.tests 22":
155 module com { module sun { module star { module uno {
156 exception Exception {};
157 published exception E2: Exception {};
161 EXPECT SUCCESS "published.tests 23":
162 module com { module sun { module star { module uno {
163 published exception Exception {};
164 exception E2: Exception {};
168 EXPECT SUCCESS "published.tests 24":
169 module com { module sun { module star { module uno {
170 published exception Exception {};
171 published exception E2: Exception {};
175 EXPECT SUCCESS "published.tests 25":
177 module com { module sun { module star { module uno {
178 exception Exception { E m; };
182 EXPECT FAILURE "published.tests 26":
184 module com { module sun { module star { module uno {
185 published exception Exception { E m; };
189 EXPECT SUCCESS "published.tests 27":
190 published enum E { V };
191 module com { module sun { module star { module uno {
192 exception Exception { E m; };
196 EXPECT SUCCESS "published.tests 28":
197 published enum E { V };
198 module com { module sun { module star { module uno {
199 published exception Exception { E m; };
203 EXPECT SUCCESS "published.tests 29":
208 EXPECT FAILURE "published.tests 30":
210 published interface I2: I1 {};
213 EXPECT SUCCESS "published.tests 31":
214 published interface I1 {};
218 EXPECT SUCCESS "published.tests 32":
219 published interface I1 {};
220 published interface I2: I1 {};
223 EXPECT SUCCESS "published.tests 33":
225 interface I1 { [attribute] E m; };
228 EXPECT FAILURE "published.tests 34":
230 published interface I1 { [attribute] E m; };
233 EXPECT SUCCESS "published.tests 35":
234 published enum E { V };
235 interface I1 { [attribute] E m; };
238 EXPECT SUCCESS "published.tests 36":
239 published enum E { V };
240 published interface I1 { [attribute] E m; };
243 EXPECT SUCCESS "published.tests 36a.1":
244 module com { module sun { module star { module uno {
245 exception Exception {};
246 interface I1 { [attribute] long m { get raises (Exception); }; };
250 EXPECT FAILURE "published.tests 36a.2":
251 module com { module sun { module star { module uno {
252 exception Exception {};
253 published interface I1 {
254 [attribute] long m { get raises (Exception); }; };
258 EXPECT SUCCESS "published.tests 36a.3":
259 module com { module sun { module star { module uno {
260 published exception Exception {};
261 interface I1 { [attribute] long m { get raises (Exception); }; };
265 EXPECT SUCCESS "published.tests 36a.4":
266 module com { module sun { module star { module uno {
267 published exception Exception {};
268 published interface I1 {
269 [attribute] long m { get raises (Exception); }; };
273 EXPECT SUCCESS "published.tests 37":
275 interface I1 { E f(); };
278 EXPECT FAILURE "published.tests 38":
280 published interface I1 { E f(); };
283 EXPECT SUCCESS "published.tests 39":
284 published enum E { V };
285 interface I1 { E f(); };
288 EXPECT SUCCESS "published.tests 40":
289 published enum E { V };
290 published interface I1 { E f(); };
293 EXPECT SUCCESS "published.tests 41":
295 interface I1 { void f([in] E p); };
298 EXPECT FAILURE "published.tests 42":
300 published interface I1 { void f([in] E p); };
303 EXPECT SUCCESS "published.tests 43":
304 published enum E { V };
305 interface I1 { void f([in] E p); };
308 EXPECT SUCCESS "published.tests 44":
309 published enum E { V };
310 published interface I1 { void f([in] E p); };
313 EXPECT SUCCESS "published.tests 45":
314 module com { module sun { module star { module uno {
315 exception Exception {};
316 interface I1 { void f() raises (Exception); };
320 EXPECT FAILURE "published.tests 46":
321 module com { module sun { module star { module uno {
322 exception Exception {};
323 published interface I1 { void f() raises (Exception); };
327 EXPECT SUCCESS "published.tests 47":
328 module com { module sun { module star { module uno {
329 published exception Exception {};
330 interface I1 { void f() raises (Exception); };
334 EXPECT SUCCESS "published.tests 48":
335 module com { module sun { module star { module uno {
336 published exception Exception {};
337 published interface I1 { void f() raises (Exception); };
341 EXPECT SUCCESS "published.tests 49":
343 interface I2 { interface I1; };
346 EXPECT FAILURE "published.tests 50":
348 published interface I2 { interface I1; };
351 EXPECT SUCCESS "published.tests 51":
352 published interface I1 {};
353 interface I2 { interface I1; };
356 EXPECT SUCCESS "published.tests 52":
357 published interface I1 {};
358 published interface I2 { interface I1; };
361 EXPECT SUCCESS "published.tests 57":
366 EXPECT FAILURE "published.tests 58":
368 published typedef E T;
371 EXPECT SUCCESS "published.tests 59":
372 published enum E { V };
376 EXPECT SUCCESS "published.tests 60":
377 published enum E { V };
378 published typedef E T;
381 EXPECT SUCCESS "published.tests 61":
387 EXPECT FAILURE "published.tests 62":
390 published struct S { T m; };
393 EXPECT FAILURE "published.tests 63":
395 published typedef E T;
399 EXPECT FAILURE "published.tests 64":
401 published typedef E T;
402 published struct S { T m; };
405 EXPECT SUCCESS "published.tests 65":
406 published enum E { V };
411 EXPECT FAILURE "published.tests 66":
412 published enum E { V };
414 published struct S { T m; };
417 EXPECT SUCCESS "published.tests 67":
418 published enum E { V };
419 published typedef E T;
423 EXPECT SUCCESS "published.tests 68":
424 published enum E { V };
425 published typedef E T;
426 published struct S { T m; };
429 EXPECT SUCCESS "published.tests 69":
431 const long C2 = C1 + 1;
434 EXPECT FAILURE "published.tests 70":
436 published const long C2 = C1 + 1;
439 EXPECT SUCCESS "published.tests 71":
440 published const long C1 = 1;
441 const long C2 = C1 + 1;
444 EXPECT SUCCESS "published.tests 72":
445 published const long C1 = 1;
446 published const long C2 = C1 + 1;
449 EXPECT SUCCESS "published.tests 73":
452 const long C2 = C1 + 1;
456 EXPECT SUCCESS "published.tests 74":
457 published constants Cs {
459 const long C2 = C1 + 1;
463 EXPECT SUCCESS "published.tests 75":
464 constants Cs { const long C1 = 1; };
465 const long C2 = Cs::C1 + 1;
468 EXPECT FAILURE "published.tests 76":
469 constants Cs { const long C1 = 1; };
470 published const long C2 = Cs::C1 + 1;
473 EXPECT SUCCESS "published.tests 77":
474 published constants Cs { const long C1 = 1; };
475 const long C2 = Cs::C1 + 1;
478 EXPECT SUCCESS "published.tests 78":
479 published constants Cs { const long C1 = 1; };
480 published const long C2 = Cs::C1 + 1;
483 EXPECT SUCCESS "published.tests 79":
485 constants Cs { const long C2 = C1 + 1; };
488 EXPECT FAILURE "published.tests 80":
490 published constants Cs { const long C2 = C1 + 1; };
493 EXPECT SUCCESS "published.tests 81":
494 published const long C1 = 1;
495 constants Cs { const long C2 = C1 + 1; };
498 EXPECT SUCCESS "published.tests 82":
499 published const long C1 = 1;
500 published constants Cs { const long C2 = C1 + 1; };
503 EXPECT SUCCESS "published.tests 83":
504 constants Cs1 { const long C1 = 1; };
505 constants Cs2 { const long C2 = Cs1::C1 + 1; };
508 EXPECT FAILURE "published.tests 84":
509 constants Cs1 { const long C1 = 1; };
510 published constants Cs2 { const long C2 = Cs1::C1 + 1; };
513 EXPECT SUCCESS "published.tests 85":
514 published constants Cs1 { const long C1 = 1; };
515 constants Cs2 { const long C2 = Cs1::C1 + 1; };
518 EXPECT SUCCESS "published.tests 86":
519 published constants Cs1 { const long C1 = 1; };
520 published constants Cs2 { const long C2 = Cs1::C1 + 1; };
523 EXPECT SUCCESS "published.tests 87":
528 EXPECT FAILURE "published.tests 88":
530 published const T C = 1;
533 EXPECT SUCCESS "published.tests 89":
534 published typedef long T;
538 EXPECT SUCCESS "published.tests 90":
539 published typedef long T;
540 published const T C = 1;
543 EXPECT SUCCESS "published.tests 91":
545 service S2 { service S1; };
548 EXPECT FAILURE "published.tests 92":
550 published service S2 { service S1; };
553 EXPECT SUCCESS "published.tests 93":
554 published service S1 {};
555 service S2 { service S1; };
558 EXPECT SUCCESS "published.tests 94":
559 published service S1 {};
560 published service S2 { service S1; };
563 EXPECT SUCCESS "published.tests 95":
565 service S { interface I1; };
568 EXPECT FAILURE "published.tests 96":
570 published service S { interface I1; };
573 EXPECT SUCCESS "published.tests 97":
574 published interface I1 {};
575 service S { interface I1; };
578 EXPECT SUCCESS "published.tests 98":
579 published interface I1 {};
580 published service S { interface I1; };
583 EXPECT SUCCESS "published.tests 99":
588 EXPECT FAILURE "published.tests 100":
590 published service S: I1;
593 EXPECT SUCCESS "published.tests 101":
594 published interface I1 {};
598 EXPECT SUCCESS "published.tests 102":
599 published interface I1 {};
600 published service S: I1;
603 EXPECT SUCCESS "published.tests 103":
611 EXPECT FAILURE "published.tests 104":
613 published interface I1 {};
614 published service S: I1 {
619 EXPECT SUCCESS "published.tests 105":
620 published enum E { V };
627 EXPECT SUCCESS "published.tests 106":
628 published enum E { V };
629 published interface I1 {};
630 published service S: I1 {
635 EXPECT SUCCESS "published.tests 107":
636 module com { module sun { module star { module uno {
637 exception Exception {};
640 f() raises (Exception);
645 EXPECT FAILURE "published.tests 108":
646 module com { module sun { module star { module uno {
647 exception Exception {};
648 published interface I1 {};
649 published service S: I1 {
650 f() raises (Exception);
655 EXPECT SUCCESS "published.tests 109":
656 module com { module sun { module star { module uno {
657 published exception Exception {};
660 f() raises (Exception);
665 EXPECT SUCCESS "published.tests 110":
666 module com { module sun { module star { module uno {
667 published exception Exception {};
668 published interface I1 {};
669 published service S: I1 {
670 f() raises (Exception);
675 EXPECT SUCCESS "published.tests 111":
677 singleton S2 { service S1; };
680 EXPECT FAILURE "published.tests 112":
682 published singleton S2 { service S1; };
685 EXPECT SUCCESS "published.tests 113":
686 published service S1 {};
687 singleton S2 { service S1; };
690 EXPECT SUCCESS "published.tests 114":
691 published service S1 {};
692 published singleton S2 { service S1; };
695 EXPECT SUCCESS "published.tests 115":
700 EXPECT FAILURE "published.tests 116":
702 published singleton S: I1;
705 EXPECT SUCCESS "published.tests 117":
706 published interface I1 {};
710 EXPECT SUCCESS "published.tests 118":
711 published interface I1 {};
712 published singleton S: I1;