xref: /trunk/main/idlc/test/parser/polystruct.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 "polystruct.tests 1":
29struct Struct<T> { T member; };
30
31
32EXPECT FAILURE "polystruct.tests 2":
33struct Struct<T,U,T,V> { long member; };
34
35
36EXPECT FAILURE "polystruct.tests 3":
37struct Struct<T> { long member; };
38typedef Struct Typedef;
39
40
41EXPECT FAILURE "polystruct.tests 4":
42struct Struct<T> { long member; };
43typedef Struct<long> Typedef;
44
45
46EXPECT SUCCESS "polystruct.tests 5":
47struct Struct<T> { long member; };
48
49
50EXPECT SUCCESS "polystruct.tests 6":
51struct Struct1<T> { T member; };
52struct Struct2 { Struct1<long> member; };
53
54
55EXPECT SUCCESS "polystruct.tests 7":
56struct Struct1<T> { T member; };
57struct Struct2 { Struct1<Struct1<string> > member; };
58
59
60EXPECT FAILURE "polystruct.tests 8":
61struct Struct1<T> { T member; };
62struct Struct2 { Struct1<int> member; };
63
64
65EXPECT FAILURE "polystruct.tests 9":
66struct Struct1<T> { T member; };
67struct Struct2 { Struct1<long,long> member; };
68
69
70EXPECT FAILURE "polystruct.tests 10":
71struct Struct2 { Struct1<long> member; };
72
73
74EXPECT FAILURE "polystruct.tests 11":
75struct Struct1<T> { T member; };
76struct Struct2 { Struct1<> member; };
77
78
79EXPECT FAILURE "polystruct.tests 12":
80struct Struct1<T> { T member; };
81struct Struct2 { Struct1<void> member; };
82
83
84EXPECT FAILURE "polystruct.tests 13":
85exception Exception {};
86struct Struct1<T> { T member; };
87struct Struct2 { Struct1<Exception> member; };
88
89
90EXPECT SUCCESS "polystruct.tests 14":
91struct Struct<T> { T T; };
92
93
94EXPECT SUCCESS "polystruct.tests 15":
95struct Struct<Struct> { Struct member; };
96
97
98EXPECT FAILURE "polystruct.tests 16":
99struct Struct<Struct> { Struct<long> member; };
100
101
102EXPECT FAILURE "polystruct.tests 17":
103struct Struct<Struct> { ::Struct member; };
104
105
106EXPECT FAILURE "polystruct.tests 18":
107struct Struct<Struct> { ::Struct<long> member; };
108
109
110EXPECT SUCCESS "polystruct.tests 19":
111struct Struct1<T> { T member; };
112struct Struct2<Struct1> { Struct1 member; };
113
114
115EXPECT SUCCESS "polystruct.tests 20":
116struct Struct1<T> { T member; };
117struct Struct2<Struct1> { Struct1<long> member; };
118
119
120EXPECT SUCCESS "polystruct.tests 21":
121struct Struct1<T> { T member; };
122struct Struct2<Struct1> { ::Struct1<long> member; };
123
124
125EXPECT FAILURE "polystruct.tests 22":
126struct Struct1 { long member1; };
127struct Struct2<T>: Struct1 { long member2; };
128
129
130EXPECT FAILURE "polystruct.tests 23":
131struct Struct1<T> { long member1; };
132struct Struct2: Struct1<long> { long member2; };
133
134
135EXPECT FAILURE "polystruct.tests 24":
136struct Struct1<T> { long member1; };
137struct Struct2<T>: Struct1<long> { long member2; };
138
139
140EXPECT FAILURE "polystruct.tests 25":
141struct Struct1<T> { long member; };
142struct Struct2 { Struct1<Struct2> member; };
143
144
145EXPECT FAILURE "polystruct.tests 26":
146struct Struct1<T> { long member; };
147struct Struct2<T> { long member; };
148struct Struct3 { Struct1<Struct2<Struct3> > member; };
149
150
151EXPECT SUCCESS "polystruct.tests 27":
152struct Struct1<T> { long member; };
153struct Struct2 { Struct1<sequence<Struct2> > member; };
154
155
156EXPECT SUCCESS "polystruct.tests 28":
157struct Struct1<T> { long member; };
158struct Struct2 { Struct1<sequence<sequence<Struct2> > > member; };
159
160
161EXPECT SUCCESS "polystruct.tests 29":
162struct Struct1<T> { long member; };
163struct Struct2 { sequence<Struct1<Struct2> > member; };
164
165
166EXPECT SUCCESS "polystruct.tests 30":
167struct Struct1<T> { long member; };
168struct Struct2 { sequence<Struct1<sequence<Struct2> > > member; };
169
170
171EXPECT SUCCESS "polystruct.tests 31":
172struct Struct1<T> { long member; };
173struct Struct2 { sequence<sequence<Struct1<Struct2> > > member; };
174
175
176EXPECT FAILURE "polystruct.tests 32":
177struct Struct<T> { Struct member; };
178
179
180EXPECT FAILURE "polystruct.tests 33":
181struct Struct<T> { Struct<long> member; };
182
183
184EXPECT FAILURE "polystruct.tests 34":
185struct Struct<T> { Struct<Struct> member; };
186
187
188EXPECT FAILURE "polystruct.tests 35":
189struct Struct<T> { Struct<Struct<long> > member; };
190
191
192EXPECT FAILURE "polystruct.tests 36":
193struct Struct1<T> { long member; };
194struct Struct2<T> { Struct1<Struct2> member; };
195
196
197EXPECT FAILURE "polystruct.tests 37":
198struct Struct1<T> { long member; };
199struct Struct2<T> { long member; };
200struct Struct3<T> { Struct1<Struct2<Struct3> > member; };
201
202
203EXPECT FAILURE "polystruct.tests 38":
204struct Struct1<T> { long member; };
205struct Struct2<T> { Struct1<Struct2<long> > member; };
206
207
208EXPECT FAILURE "polystruct.tests 39":
209struct Struct1<T> { long member; };
210struct Struct2<T> { long member; };
211struct Struct3<T> { Struct1<Struct2<Struct3<long> > > member; };
212
213
214EXPECT FAILURE "polystruct.tests 40":
215struct Struct1<T> { long member; };
216struct Struct2 { Struct1<unsigned short> member; };
217
218
219EXPECT FAILURE "polystruct.tests 41":
220struct Struct1<T, U> { long member; };
221struct Struct2<T> { long member; };
222struct Struct3 { Struct2<Struct1<long, unsigned long> > member; };
223
224
225EXPECT FAILURE "polystruct.tests 42":
226struct Struct<T> { long member; };
227interface X { void f([in] Struct<unsigned hyper> p); };
228
229
230EXPECT FAILURE "polystruct.tests 43":
231struct Struct1<T> { long member; };
232struct Struct2 { Struct1<sequence<unsigned short> > member; };
233
234
235EXPECT SUCCESS "polystruct.tests 44":
236struct Struct1<T> { long member; };
237struct Struct2 { Struct1<sequence<char> > member; };
238
239
240EXPECT FAILURE "polystruct.tests 45":
241struct Struct1<T> { long member; };
242typedef unsigned short td;
243struct Struct2 { Struct1<td> member; };
244
245
246EXPECT FAILURE "polystruct.tests 46":
247struct Struct1<T> { long member; };
248typedef sequence<unsigned short> td;
249struct Struct2 { Struct1<td> member; };
250
251
252EXPECT FAILURE "polystruct.tests 47":
253struct Struct1<T> { long member; };
254typedef unsigned short td;
255struct Struct2 { Struct1<sequence<td> > member; };
256