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