xref: /aoo42x/main/idlc/test/parser/attribute.tests (revision 57f04c0e)
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 SUCCESS "attribute.tests 1":
23interface I1 {
24    [attribute] long a;
25};
26
27
28EXPECT SUCCESS "attribute.tests 2":
29interface I1 {
30    [attribute] long a {};
31};
32
33
34EXPECT FAILURE "attribute.tests 3":
35interface I1 {
36    [attribute] long a {
37        get raises ();
38    };
39};
40
41
42EXPECT SUCCESS "attribute.tests 4":
43exception E1 {};
44interface I1 {
45    [attribute] long a {
46        get raises (E1);
47    };
48};
49
50
51EXPECT SUCCESS "attribute.tests 5":
52exception E1 {};
53interface I1 {
54    [attribute] long a {
55        set raises (E1);
56    };
57};
58
59
60EXPECT SUCCESS "attribute.tests 6":
61exception E1 {};
62interface I1 {
63    [attribute] long a {
64        get raises (E1);
65        set raises (E1);
66    };
67};
68
69
70EXPECT SUCCESS "attribute.tests 7":
71exception E1 {};
72interface I1 {
73    [attribute] long a {
74        set raises (E1);
75        get raises (E1);
76    };
77};
78
79
80EXPECT FAILURE "attribute.tests 8":
81exception E1 {};
82interface I1 {
83    [attribute] long a {
84        get raises (E1);
85        get raises (E1);
86    };
87};
88
89
90EXPECT FAILURE "attribute.tests 9":
91exception E1 {};
92interface I1 {
93    void E1();
94    [attribute] long a {
95        get raises (E1);
96    };
97};
98
99
100EXPECT FAILURE "attribute.tests 10":
101exception E1 {};
102interface I1 {
103    [attribute] long E1 {
104        get raises (E1);
105    };
106};
107
108
109EXPECT SUCCESS "attribute.tests 11":
110exception E1 {};
111interface I1 {
112    [attribute] long a {
113        get raises (E1,E1);
114    };
115};
116
117
118EXPECT SUCCESS "attribute.tests 12":
119exception E1 {};
120interface I1 {
121    [attribute, readonly] long a {
122        get raises (E1);
123    };
124};
125
126
127EXPECT FAILURE "attribute.tests 13":
128exception E1 {};
129interface I1 {
130    [attribute, readonly] long a {
131        set raises (E1);
132    };
133};
134
135
136EXPECT FAILURE "attribute.tests 14":
137interface I1 {
138    [] long a;
139};
140
141
142EXPECT SUCCESS "attribute.tests 15":
143interface I1 {
144    [attribute] long a;
145};
146
147
148EXPECT FAILURE "attribute.tests 16":
149interface I1 {
150    [attribute, property] long a;
151};
152
153
154EXPECT FAILURE "attribute.tests 17":
155interface I1 {
156    [attribute, optional] long a;
157};
158
159
160EXPECT FAILURE "attribute.tests 18":
161interface I1 {
162    [attribute, maybevoid] long a;
163};
164
165
166EXPECT FAILURE "attribute.tests 19":
167interface I1 {
168    [attribute, constrained] long a;
169};
170
171
172EXPECT FAILURE "attribute.tests 20":
173interface I1 {
174    [attribute, transient] long a;
175};
176
177
178EXPECT FAILURE "attribute.tests 21":
179interface I1 {
180    [attribute, maybeambigious] long a;
181};
182
183
184EXPECT FAILURE "attribute.tests 22":
185interface I1 {
186    [attribute, maybedefault] long a;
187};
188
189
190EXPECT FAILURE "attribute.tests 23":
191interface I1 {
192    [attribute, removeable] long a;
193};
194
195
196EXPECT SUCCESS "attribute.tests 24":
197interface I1 {
198    [attribute, bound] long a;
199};
200
201
202EXPECT SUCCESS "attribute.tests 25":
203interface I1 {
204    [bound, attribute] long a;
205};
206
207
208EXPECT SUCCESS "attribute.tests 26":
209interface I1 {
210    [attribute, readonly] long a;
211};
212
213
214EXPECT SUCCESS "attribute.tests 27":
215interface I1 {
216    [attribute, bound, readonly] long a;
217};
218