xref: /aoo41x/main/idlc/test/parser/polystruct.tests (revision 57f04c0e)
1*57f04c0eSAndrew Rist#**************************************************************
2*57f04c0eSAndrew Rist#
3*57f04c0eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*57f04c0eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*57f04c0eSAndrew Rist#  distributed with this work for additional information
6*57f04c0eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*57f04c0eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*57f04c0eSAndrew Rist#  "License"); you may not use this file except in compliance
9*57f04c0eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*57f04c0eSAndrew Rist#
11*57f04c0eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*57f04c0eSAndrew Rist#
13*57f04c0eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*57f04c0eSAndrew Rist#  software distributed under the License is distributed on an
15*57f04c0eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*57f04c0eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*57f04c0eSAndrew Rist#  specific language governing permissions and limitations
18*57f04c0eSAndrew Rist#  under the License.
19*57f04c0eSAndrew Rist#
20*57f04c0eSAndrew Rist#**************************************************************
21cdf0e10cSrcweir
22cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 1":
23cdf0e10cSrcweirstruct Struct<T> { T member; };
24cdf0e10cSrcweir
25cdf0e10cSrcweir
26cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 2":
27cdf0e10cSrcweirstruct Struct<T,U,T,V> { long member; };
28cdf0e10cSrcweir
29cdf0e10cSrcweir
30cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 3":
31cdf0e10cSrcweirstruct Struct<T> { long member; };
32cdf0e10cSrcweirtypedef Struct Typedef;
33cdf0e10cSrcweir
34cdf0e10cSrcweir
35cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 4":
36cdf0e10cSrcweirstruct Struct<T> { long member; };
37cdf0e10cSrcweirtypedef Struct<long> Typedef;
38cdf0e10cSrcweir
39cdf0e10cSrcweir
40cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 5":
41cdf0e10cSrcweirstruct Struct<T> { long member; };
42cdf0e10cSrcweir
43cdf0e10cSrcweir
44cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 6":
45cdf0e10cSrcweirstruct Struct1<T> { T member; };
46cdf0e10cSrcweirstruct Struct2 { Struct1<long> member; };
47cdf0e10cSrcweir
48cdf0e10cSrcweir
49cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 7":
50cdf0e10cSrcweirstruct Struct1<T> { T member; };
51cdf0e10cSrcweirstruct Struct2 { Struct1<Struct1<string> > member; };
52cdf0e10cSrcweir
53cdf0e10cSrcweir
54cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 8":
55cdf0e10cSrcweirstruct Struct1<T> { T member; };
56cdf0e10cSrcweirstruct Struct2 { Struct1<int> member; };
57cdf0e10cSrcweir
58cdf0e10cSrcweir
59cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 9":
60cdf0e10cSrcweirstruct Struct1<T> { T member; };
61cdf0e10cSrcweirstruct Struct2 { Struct1<long,long> member; };
62cdf0e10cSrcweir
63cdf0e10cSrcweir
64cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 10":
65cdf0e10cSrcweirstruct Struct2 { Struct1<long> member; };
66cdf0e10cSrcweir
67cdf0e10cSrcweir
68cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 11":
69cdf0e10cSrcweirstruct Struct1<T> { T member; };
70cdf0e10cSrcweirstruct Struct2 { Struct1<> member; };
71cdf0e10cSrcweir
72cdf0e10cSrcweir
73cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 12":
74cdf0e10cSrcweirstruct Struct1<T> { T member; };
75cdf0e10cSrcweirstruct Struct2 { Struct1<void> member; };
76cdf0e10cSrcweir
77cdf0e10cSrcweir
78cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 13":
79cdf0e10cSrcweirexception Exception {};
80cdf0e10cSrcweirstruct Struct1<T> { T member; };
81cdf0e10cSrcweirstruct Struct2 { Struct1<Exception> member; };
82cdf0e10cSrcweir
83cdf0e10cSrcweir
84cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 14":
85cdf0e10cSrcweirstruct Struct<T> { T T; };
86cdf0e10cSrcweir
87cdf0e10cSrcweir
88cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 15":
89cdf0e10cSrcweirstruct Struct<Struct> { Struct member; };
90cdf0e10cSrcweir
91cdf0e10cSrcweir
92cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 16":
93cdf0e10cSrcweirstruct Struct<Struct> { Struct<long> member; };
94cdf0e10cSrcweir
95cdf0e10cSrcweir
96cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 17":
97cdf0e10cSrcweirstruct Struct<Struct> { ::Struct member; };
98cdf0e10cSrcweir
99cdf0e10cSrcweir
100cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 18":
101cdf0e10cSrcweirstruct Struct<Struct> { ::Struct<long> member; };
102cdf0e10cSrcweir
103cdf0e10cSrcweir
104cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 19":
105cdf0e10cSrcweirstruct Struct1<T> { T member; };
106cdf0e10cSrcweirstruct Struct2<Struct1> { Struct1 member; };
107cdf0e10cSrcweir
108cdf0e10cSrcweir
109cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 20":
110cdf0e10cSrcweirstruct Struct1<T> { T member; };
111cdf0e10cSrcweirstruct Struct2<Struct1> { Struct1<long> member; };
112cdf0e10cSrcweir
113cdf0e10cSrcweir
114cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 21":
115cdf0e10cSrcweirstruct Struct1<T> { T member; };
116cdf0e10cSrcweirstruct Struct2<Struct1> { ::Struct1<long> member; };
117cdf0e10cSrcweir
118cdf0e10cSrcweir
119cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 22":
120cdf0e10cSrcweirstruct Struct1 { long member1; };
121cdf0e10cSrcweirstruct Struct2<T>: Struct1 { long member2; };
122cdf0e10cSrcweir
123cdf0e10cSrcweir
124cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 23":
125cdf0e10cSrcweirstruct Struct1<T> { long member1; };
126cdf0e10cSrcweirstruct Struct2: Struct1<long> { long member2; };
127cdf0e10cSrcweir
128cdf0e10cSrcweir
129cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 24":
130cdf0e10cSrcweirstruct Struct1<T> { long member1; };
131cdf0e10cSrcweirstruct Struct2<T>: Struct1<long> { long member2; };
132cdf0e10cSrcweir
133cdf0e10cSrcweir
134cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 25":
135cdf0e10cSrcweirstruct Struct1<T> { long member; };
136cdf0e10cSrcweirstruct Struct2 { Struct1<Struct2> member; };
137cdf0e10cSrcweir
138cdf0e10cSrcweir
139cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 26":
140cdf0e10cSrcweirstruct Struct1<T> { long member; };
141cdf0e10cSrcweirstruct Struct2<T> { long member; };
142cdf0e10cSrcweirstruct Struct3 { Struct1<Struct2<Struct3> > member; };
143cdf0e10cSrcweir
144cdf0e10cSrcweir
145cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 27":
146cdf0e10cSrcweirstruct Struct1<T> { long member; };
147cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<Struct2> > member; };
148cdf0e10cSrcweir
149cdf0e10cSrcweir
150cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 28":
151cdf0e10cSrcweirstruct Struct1<T> { long member; };
152cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<sequence<Struct2> > > member; };
153cdf0e10cSrcweir
154cdf0e10cSrcweir
155cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 29":
156cdf0e10cSrcweirstruct Struct1<T> { long member; };
157cdf0e10cSrcweirstruct Struct2 { sequence<Struct1<Struct2> > member; };
158cdf0e10cSrcweir
159cdf0e10cSrcweir
160cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 30":
161cdf0e10cSrcweirstruct Struct1<T> { long member; };
162cdf0e10cSrcweirstruct Struct2 { sequence<Struct1<sequence<Struct2> > > member; };
163cdf0e10cSrcweir
164cdf0e10cSrcweir
165cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 31":
166cdf0e10cSrcweirstruct Struct1<T> { long member; };
167cdf0e10cSrcweirstruct Struct2 { sequence<sequence<Struct1<Struct2> > > member; };
168cdf0e10cSrcweir
169cdf0e10cSrcweir
170cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 32":
171cdf0e10cSrcweirstruct Struct<T> { Struct member; };
172cdf0e10cSrcweir
173cdf0e10cSrcweir
174cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 33":
175cdf0e10cSrcweirstruct Struct<T> { Struct<long> member; };
176cdf0e10cSrcweir
177cdf0e10cSrcweir
178cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 34":
179cdf0e10cSrcweirstruct Struct<T> { Struct<Struct> member; };
180cdf0e10cSrcweir
181cdf0e10cSrcweir
182cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 35":
183cdf0e10cSrcweirstruct Struct<T> { Struct<Struct<long> > member; };
184cdf0e10cSrcweir
185cdf0e10cSrcweir
186cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 36":
187cdf0e10cSrcweirstruct Struct1<T> { long member; };
188cdf0e10cSrcweirstruct Struct2<T> { Struct1<Struct2> member; };
189cdf0e10cSrcweir
190cdf0e10cSrcweir
191cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 37":
192cdf0e10cSrcweirstruct Struct1<T> { long member; };
193cdf0e10cSrcweirstruct Struct2<T> { long member; };
194cdf0e10cSrcweirstruct Struct3<T> { Struct1<Struct2<Struct3> > member; };
195cdf0e10cSrcweir
196cdf0e10cSrcweir
197cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 38":
198cdf0e10cSrcweirstruct Struct1<T> { long member; };
199cdf0e10cSrcweirstruct Struct2<T> { Struct1<Struct2<long> > member; };
200cdf0e10cSrcweir
201cdf0e10cSrcweir
202cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 39":
203cdf0e10cSrcweirstruct Struct1<T> { long member; };
204cdf0e10cSrcweirstruct Struct2<T> { long member; };
205cdf0e10cSrcweirstruct Struct3<T> { Struct1<Struct2<Struct3<long> > > member; };
206cdf0e10cSrcweir
207cdf0e10cSrcweir
208cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 40":
209cdf0e10cSrcweirstruct Struct1<T> { long member; };
210cdf0e10cSrcweirstruct Struct2 { Struct1<unsigned short> member; };
211cdf0e10cSrcweir
212cdf0e10cSrcweir
213cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 41":
214cdf0e10cSrcweirstruct Struct1<T, U> { long member; };
215cdf0e10cSrcweirstruct Struct2<T> { long member; };
216cdf0e10cSrcweirstruct Struct3 { Struct2<Struct1<long, unsigned long> > member; };
217cdf0e10cSrcweir
218cdf0e10cSrcweir
219cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 42":
220cdf0e10cSrcweirstruct Struct<T> { long member; };
221cdf0e10cSrcweirinterface X { void f([in] Struct<unsigned hyper> p); };
222cdf0e10cSrcweir
223cdf0e10cSrcweir
224cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 43":
225cdf0e10cSrcweirstruct Struct1<T> { long member; };
226cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<unsigned short> > member; };
227cdf0e10cSrcweir
228cdf0e10cSrcweir
229cdf0e10cSrcweirEXPECT SUCCESS "polystruct.tests 44":
230cdf0e10cSrcweirstruct Struct1<T> { long member; };
231cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<char> > member; };
232cdf0e10cSrcweir
233cdf0e10cSrcweir
234cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 45":
235cdf0e10cSrcweirstruct Struct1<T> { long member; };
236cdf0e10cSrcweirtypedef unsigned short td;
237cdf0e10cSrcweirstruct Struct2 { Struct1<td> member; };
238cdf0e10cSrcweir
239cdf0e10cSrcweir
240cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 46":
241cdf0e10cSrcweirstruct Struct1<T> { long member; };
242cdf0e10cSrcweirtypedef sequence<unsigned short> td;
243cdf0e10cSrcweirstruct Struct2 { Struct1<td> member; };
244cdf0e10cSrcweir
245cdf0e10cSrcweir
246cdf0e10cSrcweirEXPECT FAILURE "polystruct.tests 47":
247cdf0e10cSrcweirstruct Struct1<T> { long member; };
248cdf0e10cSrcweirtypedef unsigned short td;
249cdf0e10cSrcweirstruct Struct2 { Struct1<sequence<td> > member; };
250