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