|
1 def WebIDLTest(parser, harness): |
|
2 threw = False |
|
3 try: |
|
4 parser.parse(""" |
|
5 interface SpecialMethodSignatureMismatch1 { |
|
6 getter long long foo(long index); |
|
7 }; |
|
8 """) |
|
9 |
|
10 results = parser.finish() |
|
11 except: |
|
12 threw = True |
|
13 |
|
14 harness.ok(threw, "Should have thrown.") |
|
15 |
|
16 threw = False |
|
17 try: |
|
18 parser.parse(""" |
|
19 interface SpecialMethodSignatureMismatch2 { |
|
20 getter void foo(unsigned long index); |
|
21 }; |
|
22 """) |
|
23 |
|
24 results = parser.finish() |
|
25 except: |
|
26 threw = True |
|
27 |
|
28 harness.ok(threw, "Should have thrown.") |
|
29 |
|
30 threw = False |
|
31 try: |
|
32 parser.parse(""" |
|
33 interface SpecialMethodSignatureMismatch3 { |
|
34 getter boolean foo(unsigned long index, boolean extraArg); |
|
35 }; |
|
36 """) |
|
37 |
|
38 results = parser.finish() |
|
39 except: |
|
40 threw = True |
|
41 |
|
42 harness.ok(threw, "Should have thrown.") |
|
43 |
|
44 threw = False |
|
45 try: |
|
46 parser.parse(""" |
|
47 interface SpecialMethodSignatureMismatch4 { |
|
48 getter boolean foo(unsigned long... index); |
|
49 }; |
|
50 """) |
|
51 |
|
52 results = parser.finish() |
|
53 except: |
|
54 threw = True |
|
55 |
|
56 harness.ok(threw, "Should have thrown.") |
|
57 |
|
58 threw = False |
|
59 try: |
|
60 parser.parse(""" |
|
61 interface SpecialMethodSignatureMismatch5 { |
|
62 getter boolean foo(optional unsigned long index); |
|
63 }; |
|
64 """) |
|
65 |
|
66 results = parser.finish() |
|
67 except: |
|
68 threw = True |
|
69 |
|
70 harness.ok(threw, "Should have thrown.") |
|
71 |
|
72 threw = False |
|
73 try: |
|
74 parser.parse(""" |
|
75 interface SpecialMethodSignatureMismatch6 { |
|
76 getter boolean foo(); |
|
77 }; |
|
78 """) |
|
79 |
|
80 results = parser.finish() |
|
81 except: |
|
82 threw = True |
|
83 |
|
84 harness.ok(threw, "Should have thrown.") |
|
85 |
|
86 threw = False |
|
87 try: |
|
88 parser.parse(""" |
|
89 interface SpecialMethodSignatureMismatch7 { |
|
90 deleter long long foo(long index); |
|
91 }; |
|
92 """) |
|
93 |
|
94 results = parser.finish() |
|
95 except: |
|
96 threw = True |
|
97 |
|
98 harness.ok(threw, "Should have thrown.") |
|
99 |
|
100 threw = False |
|
101 try: |
|
102 parser.parse(""" |
|
103 interface SpecialMethodSignatureMismatch9 { |
|
104 deleter boolean foo(unsigned long index, boolean extraArg); |
|
105 }; |
|
106 """) |
|
107 |
|
108 results = parser.finish() |
|
109 except: |
|
110 threw = True |
|
111 |
|
112 harness.ok(threw, "Should have thrown.") |
|
113 |
|
114 threw = False |
|
115 try: |
|
116 parser.parse(""" |
|
117 interface SpecialMethodSignatureMismatch10 { |
|
118 deleter boolean foo(unsigned long... index); |
|
119 }; |
|
120 """) |
|
121 |
|
122 results = parser.finish() |
|
123 except: |
|
124 threw = True |
|
125 |
|
126 harness.ok(threw, "Should have thrown.") |
|
127 |
|
128 threw = False |
|
129 try: |
|
130 parser.parse(""" |
|
131 interface SpecialMethodSignatureMismatch11 { |
|
132 deleter boolean foo(optional unsigned long index); |
|
133 }; |
|
134 """) |
|
135 |
|
136 results = parser.finish() |
|
137 except: |
|
138 threw = True |
|
139 |
|
140 harness.ok(threw, "Should have thrown.") |
|
141 |
|
142 threw = False |
|
143 try: |
|
144 parser.parse(""" |
|
145 interface SpecialMethodSignatureMismatch12 { |
|
146 deleter boolean foo(); |
|
147 }; |
|
148 """) |
|
149 |
|
150 results = parser.finish() |
|
151 except: |
|
152 threw = True |
|
153 |
|
154 harness.ok(threw, "Should have thrown.") |
|
155 |
|
156 threw = False |
|
157 try: |
|
158 parser.parse(""" |
|
159 interface SpecialMethodSignatureMismatch13 { |
|
160 setter long long foo(long index, long long value); |
|
161 }; |
|
162 """) |
|
163 |
|
164 results = parser.finish() |
|
165 except: |
|
166 threw = True |
|
167 |
|
168 harness.ok(threw, "Should have thrown.") |
|
169 |
|
170 threw = False |
|
171 try: |
|
172 parser.parse(""" |
|
173 interface SpecialMethodSignatureMismatch15 { |
|
174 setter boolean foo(unsigned long index, boolean value, long long extraArg); |
|
175 }; |
|
176 """) |
|
177 |
|
178 results = parser.finish() |
|
179 except: |
|
180 threw = True |
|
181 |
|
182 harness.ok(threw, "Should have thrown.") |
|
183 |
|
184 threw = False |
|
185 try: |
|
186 parser.parse(""" |
|
187 interface SpecialMethodSignatureMismatch16 { |
|
188 setter boolean foo(unsigned long index, boolean... value); |
|
189 }; |
|
190 """) |
|
191 |
|
192 results = parser.finish() |
|
193 except: |
|
194 threw = True |
|
195 |
|
196 harness.ok(threw, "Should have thrown.") |
|
197 |
|
198 threw = False |
|
199 try: |
|
200 parser.parse(""" |
|
201 interface SpecialMethodSignatureMismatch17 { |
|
202 setter boolean foo(unsigned long index, optional boolean value); |
|
203 }; |
|
204 """) |
|
205 |
|
206 results = parser.finish() |
|
207 except: |
|
208 threw = True |
|
209 |
|
210 harness.ok(threw, "Should have thrown.") |
|
211 |
|
212 threw = False |
|
213 try: |
|
214 parser.parse(""" |
|
215 interface SpecialMethodSignatureMismatch18 { |
|
216 setter boolean foo(); |
|
217 }; |
|
218 """) |
|
219 |
|
220 results = parser.finish() |
|
221 except: |
|
222 threw = True |
|
223 |
|
224 harness.ok(threw, "Should have thrown.") |
|
225 |
|
226 threw = False |
|
227 try: |
|
228 parser.parse(""" |
|
229 interface SpecialMethodSignatureMismatch20 { |
|
230 creator long long foo(long index, long long value); |
|
231 }; |
|
232 """) |
|
233 |
|
234 results = parser.finish() |
|
235 except: |
|
236 threw = True |
|
237 |
|
238 harness.ok(threw, "Should have thrown.") |
|
239 |
|
240 threw = False |
|
241 try: |
|
242 parser.parse(""" |
|
243 interface SpecialMethodSignatureMismatch22 { |
|
244 creator boolean foo(unsigned long index, boolean value, long long extraArg); |
|
245 }; |
|
246 """) |
|
247 |
|
248 results = parser.finish() |
|
249 except: |
|
250 threw = True |
|
251 |
|
252 harness.ok(threw, "Should have thrown.") |
|
253 |
|
254 threw = False |
|
255 try: |
|
256 parser.parse(""" |
|
257 interface SpecialMethodSignatureMismatch23 { |
|
258 creator boolean foo(unsigned long index, boolean... value); |
|
259 }; |
|
260 """) |
|
261 |
|
262 results = parser.finish() |
|
263 except: |
|
264 threw = True |
|
265 |
|
266 harness.ok(threw, "Should have thrown.") |
|
267 |
|
268 threw = False |
|
269 try: |
|
270 parser.parse(""" |
|
271 interface SpecialMethodSignatureMismatch24 { |
|
272 creator boolean foo(unsigned long index, optional boolean value); |
|
273 }; |
|
274 """) |
|
275 |
|
276 results = parser.finish() |
|
277 except: |
|
278 threw = True |
|
279 |
|
280 harness.ok(threw, "Should have thrown.") |
|
281 |
|
282 threw = False |
|
283 try: |
|
284 parser.parse(""" |
|
285 interface SpecialMethodSignatureMismatch25 { |
|
286 creator boolean foo(); |
|
287 }; |
|
288 """) |
|
289 |
|
290 results = parser.finish() |
|
291 except: |
|
292 threw = True |
|
293 |
|
294 harness.ok(threw, "Should have thrown.") |