OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'package:analyzer/dart/ast/ast.dart'; | 5 import 'package:analyzer/dart/ast/ast.dart'; |
6 import 'package:analyzer/dart/ast/token.dart' as analyzer; | 6 import 'package:analyzer/dart/ast/token.dart' as analyzer; |
7 import 'package:analyzer/dart/ast/token.dart' show TokenType; | 7 import 'package:analyzer/dart/ast/token.dart' show TokenType; |
8 import 'package:analyzer/error/error.dart'; | 8 import 'package:analyzer/error/error.dart'; |
9 import 'package:analyzer/error/listener.dart' show ErrorReporter; | 9 import 'package:analyzer/error/listener.dart' show ErrorReporter; |
10 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 10 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 /** | 71 /** |
72 * Tests of the fasta parser based on [ComplexParserTestMixin]. | 72 * Tests of the fasta parser based on [ComplexParserTestMixin]. |
73 */ | 73 */ |
74 @reflectiveTest | 74 @reflectiveTest |
75 class ComplexParserTest_Fasta extends FastaParserTestCase | 75 class ComplexParserTest_Fasta extends FastaParserTestCase |
76 with ComplexParserTestMixin { | 76 with ComplexParserTestMixin { |
77 @override | 77 @override |
78 @failingTest | 78 @failingTest |
79 void test_assignableExpression_arguments_normal_chain_typeArgumentComments() { | 79 void test_assignableExpression_arguments_normal_chain_typeArgumentComments() { |
80 // TODO(paulberry,ahe): Fasta doesn't support generic method comment syntax. | 80 // TODO(brianwilkerson) Does not inject generic type arguments following a |
| 81 // function-valued expression, returning "a<E>(b)(c).d<G>(e).f". |
81 super | 82 super |
82 .test_assignableExpression_arguments_normal_chain_typeArgumentComments()
; | 83 .test_assignableExpression_arguments_normal_chain_typeArgumentComments()
; |
83 } | 84 } |
84 | 85 |
85 @override | 86 @override |
86 @failingTest | 87 @failingTest |
87 void test_assignableExpression_arguments_normal_chain_typeArguments() { | 88 void test_assignableExpression_arguments_normal_chain_typeArguments() { |
88 // TODO(paulberry,ahe): AstBuilder doesn't implement | 89 // TODO(brianwilkerson) Does not parse generic type arguments following a |
89 // endTypeArguments(). | 90 // function-valued expression, returning the binary expression "a<E>(b) < F"
. |
90 super.test_assignableExpression_arguments_normal_chain_typeArguments(); | 91 super.test_assignableExpression_arguments_normal_chain_typeArguments(); |
91 } | 92 } |
92 | 93 |
93 @override | 94 @override |
94 @failingTest | 95 @failingTest |
95 void test_equalityExpression_normal() { | 96 void test_equalityExpression_normal() { |
96 // TODO(scheglov) error checking is not implemented | 97 // TODO(brianwilkerson) Does not recover. |
97 super.test_equalityExpression_normal(); | 98 super.test_equalityExpression_normal(); |
98 } | 99 } |
99 | 100 |
100 @override | 101 @override |
101 @failingTest | 102 @failingTest |
102 void test_equalityExpression_super() { | 103 void test_equalityExpression_super() { |
103 // TODO(scheglov) error checking is not implemented | 104 // TODO(brianwilkerson) Does not recover. |
104 super.test_equalityExpression_super(); | 105 super.test_equalityExpression_super(); |
105 } | 106 } |
106 } | 107 } |
107 | 108 |
108 /** | 109 /** |
109 * Tests of the fasta parser based on [ErrorParserTest]. | 110 * Tests of the fasta parser based on [ErrorParserTest]. |
110 */ | 111 */ |
111 @reflectiveTest | 112 @reflectiveTest |
112 class ErrorParserTest_Fasta extends FastaParserTestCase | 113 class ErrorParserTest_Fasta extends FastaParserTestCase |
113 with ErrorParserTestMixin { | 114 with ErrorParserTestMixin { |
114 @override | 115 @override |
115 @failingTest | 116 @failingTest |
116 void test_annotationOnEnumConstant_first() { | 117 void test_annotationOnEnumConstant_first() { |
| 118 // TODO(brianwilkerson) Does not support annotations on enum constants. |
117 super.test_annotationOnEnumConstant_first(); | 119 super.test_annotationOnEnumConstant_first(); |
118 } | 120 } |
119 | 121 |
120 @override | 122 @override |
121 @failingTest | 123 @failingTest |
122 void test_annotationOnEnumConstant_middle() { | 124 void test_annotationOnEnumConstant_middle() { |
| 125 // TODO(brianwilkerson) Does not support annotations on enum constants. |
123 super.test_annotationOnEnumConstant_middle(); | 126 super.test_annotationOnEnumConstant_middle(); |
124 } | 127 } |
125 | 128 |
126 @override | 129 @override |
127 @failingTest | 130 @failingTest |
128 void test_breakOutsideOfLoop_breakInDoStatement() { | |
129 super.test_breakOutsideOfLoop_breakInDoStatement(); | |
130 } | |
131 | |
132 @override | |
133 @failingTest | |
134 void test_breakOutsideOfLoop_breakInForStatement() { | |
135 super.test_breakOutsideOfLoop_breakInForStatement(); | |
136 } | |
137 | |
138 @override | |
139 @failingTest | |
140 void test_breakOutsideOfLoop_breakInIfStatement() { | 131 void test_breakOutsideOfLoop_breakInIfStatement() { |
| 132 // TODO(brianwilkerson) Wrong errors: |
| 133 // Expected 1 errors of type ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, found 0 |
141 super.test_breakOutsideOfLoop_breakInIfStatement(); | 134 super.test_breakOutsideOfLoop_breakInIfStatement(); |
142 } | 135 } |
143 | 136 |
144 @override | 137 @override |
145 @failingTest | 138 @failingTest |
146 void test_breakOutsideOfLoop_breakInSwitchStatement() { | |
147 super.test_breakOutsideOfLoop_breakInSwitchStatement(); | |
148 } | |
149 | |
150 @override | |
151 @failingTest | |
152 void test_breakOutsideOfLoop_breakInWhileStatement() { | |
153 super.test_breakOutsideOfLoop_breakInWhileStatement(); | |
154 } | |
155 | |
156 @override | |
157 @failingTest | |
158 void test_breakOutsideOfLoop_functionExpression_inALoop() { | 139 void test_breakOutsideOfLoop_functionExpression_inALoop() { |
| 140 // TODO(brianwilkerson) Wrong errors: |
| 141 // Expected 1 errors of type ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, found 0 |
159 super.test_breakOutsideOfLoop_functionExpression_inALoop(); | 142 super.test_breakOutsideOfLoop_functionExpression_inALoop(); |
160 } | 143 } |
161 | 144 |
162 @override | 145 @override |
163 @failingTest | 146 @failingTest |
164 void test_classInClass_abstract() { | 147 void test_classInClass_abstract() { |
| 148 // TODO(brianwilkerson) Does not recover. |
165 super.test_classInClass_abstract(); | 149 super.test_classInClass_abstract(); |
166 } | 150 } |
167 | 151 |
168 @override | 152 @override |
169 @failingTest | 153 @failingTest |
170 void test_classInClass_nonAbstract() { | 154 void test_classInClass_nonAbstract() { |
| 155 // TODO(brianwilkerson) Does not recover. |
171 super.test_classInClass_nonAbstract(); | 156 super.test_classInClass_nonAbstract(); |
172 } | 157 } |
173 | 158 |
174 @override | 159 @override |
175 @failingTest | 160 @failingTest |
176 void test_classTypeAlias_abstractAfterEq() { | 161 void test_classTypeAlias_abstractAfterEq() { |
| 162 // TODO(brianwilkerson) Does not recover. |
177 super.test_classTypeAlias_abstractAfterEq(); | 163 super.test_classTypeAlias_abstractAfterEq(); |
178 } | 164 } |
179 | 165 |
180 @override | 166 @override |
181 @failingTest | 167 @failingTest |
182 void test_colonInPlaceOfIn() { | 168 void test_colonInPlaceOfIn() { |
| 169 // TODO(brianwilkerson) Does not recover. |
183 super.test_colonInPlaceOfIn(); | 170 super.test_colonInPlaceOfIn(); |
184 } | 171 } |
185 | 172 |
186 @override | 173 @override |
187 @failingTest | 174 @failingTest |
188 void test_constAndCovariant() { | 175 void test_constAndCovariant() { |
| 176 // TODO(brianwilkerson) Does not recover. |
189 super.test_constAndCovariant(); | 177 super.test_constAndCovariant(); |
190 } | 178 } |
191 | 179 |
192 @override | 180 @override |
193 @failingTest | 181 @failingTest |
194 void test_constAndFinal() { | 182 void test_constAndFinal() { |
| 183 // TODO(brianwilkerson) Does not recover. |
195 super.test_constAndFinal(); | 184 super.test_constAndFinal(); |
196 } | 185 } |
197 | 186 |
198 @override | 187 @override |
199 @failingTest | 188 @failingTest |
200 void test_constAndVar() { | 189 void test_constAndVar() { |
| 190 // TODO(brianwilkerson) Does not recover. |
201 super.test_constAndVar(); | 191 super.test_constAndVar(); |
202 } | 192 } |
203 | 193 |
204 @override | 194 @override |
205 @failingTest | 195 @failingTest |
206 void test_constClass() { | 196 void test_constClass() { |
| 197 // TODO(brianwilkerson) Wrong errors: |
| 198 // Expected 1 errors of type ParserErrorCode.CONST_CLASS, found 0; |
| 199 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7) |
207 super.test_constClass(); | 200 super.test_constClass(); |
208 } | 201 } |
209 | 202 |
210 @override | 203 @override |
211 @failingTest | 204 @failingTest |
212 void test_constConstructorWithBody() { | 205 void test_constConstructorWithBody() { |
| 206 // TODO(brianwilkerson) Wrong errors: |
| 207 // Expected 1 errors of type ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, fo
und 0 |
213 super.test_constConstructorWithBody(); | 208 super.test_constConstructorWithBody(); |
214 } | 209 } |
215 | 210 |
216 @override | 211 @override |
217 @failingTest | 212 @failingTest |
218 void test_constEnum() { | 213 void test_constEnum() { |
| 214 // TODO(brianwilkerson) Wrong errors: |
| 215 // Expected 1 errors of type ParserErrorCode.CONST_ENUM, found 0; |
| 216 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7) |
219 super.test_constEnum(); | 217 super.test_constEnum(); |
220 } | 218 } |
221 | 219 |
222 @override | 220 @override |
223 @failingTest | 221 @failingTest |
224 void test_constFactory() { | 222 void test_constFactory() { |
| 223 // TODO(brianwilkerson) Wrong errors: |
| 224 // Expected 1 errors of type ParserErrorCode.CONST_FACTORY, found 0 |
225 super.test_constFactory(); | 225 super.test_constFactory(); |
226 } | 226 } |
227 | 227 |
228 @override | 228 @override |
229 @failingTest | 229 @failingTest |
230 void test_constMethod() { | 230 void test_constMethod() { |
| 231 // TODO(brianwilkerson) Wrong errors: |
| 232 // Expected 1 errors of type ParserErrorCode.CONST_METHOD, found 0 |
231 super.test_constMethod(); | 233 super.test_constMethod(); |
232 } | 234 } |
233 | 235 |
234 @override | 236 @override |
235 @failingTest | 237 @failingTest |
236 void test_constructorWithReturnType() { | 238 void test_constructorWithReturnType() { |
| 239 // TODO(brianwilkerson) Wrong errors: |
| 240 // Expected 1 errors of type ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, f
ound 0 |
237 super.test_constructorWithReturnType(); | 241 super.test_constructorWithReturnType(); |
238 } | 242 } |
239 | 243 |
240 @override | 244 @override |
241 @failingTest | 245 @failingTest |
242 void test_constructorWithReturnType_var() { | 246 void test_constructorWithReturnType_var() { |
| 247 // TODO(brianwilkerson) Wrong errors: |
| 248 // Expected 1 errors of type ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, f
ound 0; |
| 249 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (0) |
243 super.test_constructorWithReturnType_var(); | 250 super.test_constructorWithReturnType_var(); |
244 } | 251 } |
245 | 252 |
246 @override | 253 @override |
247 @failingTest | 254 @failingTest |
248 void test_constTypedef() { | 255 void test_constTypedef() { |
| 256 // TODO(brianwilkerson) Wrong errors: |
| 257 // Expected 1 errors of type ParserErrorCode.CONST_TYPEDEF, found 0; |
| 258 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7) |
249 super.test_constTypedef(); | 259 super.test_constTypedef(); |
250 } | 260 } |
251 | 261 |
252 @override | 262 @override |
253 @failingTest | 263 @failingTest |
254 void test_continueOutsideOfLoop_continueInDoStatement() { | |
255 super.test_continueOutsideOfLoop_continueInDoStatement(); | |
256 } | |
257 | |
258 @override | |
259 @failingTest | |
260 void test_continueOutsideOfLoop_continueInForStatement() { | |
261 super.test_continueOutsideOfLoop_continueInForStatement(); | |
262 } | |
263 | |
264 @override | |
265 @failingTest | |
266 void test_continueOutsideOfLoop_continueInIfStatement() { | 264 void test_continueOutsideOfLoop_continueInIfStatement() { |
| 265 // TODO(brianwilkerson) Wrong errors: |
| 266 // Expected 1 errors of type ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, found
0 |
267 super.test_continueOutsideOfLoop_continueInIfStatement(); | 267 super.test_continueOutsideOfLoop_continueInIfStatement(); |
268 } | 268 } |
269 | 269 |
270 @override | 270 @override |
271 @failingTest | 271 @failingTest |
272 void test_continueOutsideOfLoop_continueInSwitchStatement() { | |
273 super.test_continueOutsideOfLoop_continueInSwitchStatement(); | |
274 } | |
275 | |
276 @override | |
277 @failingTest | |
278 void test_continueOutsideOfLoop_continueInWhileStatement() { | |
279 super.test_continueOutsideOfLoop_continueInWhileStatement(); | |
280 } | |
281 | |
282 @override | |
283 @failingTest | |
284 void test_continueOutsideOfLoop_functionExpression_inALoop() { | 272 void test_continueOutsideOfLoop_functionExpression_inALoop() { |
| 273 // TODO(brianwilkerson) Wrong errors: |
| 274 // Expected 1 errors of type ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, found
0 |
285 super.test_continueOutsideOfLoop_functionExpression_inALoop(); | 275 super.test_continueOutsideOfLoop_functionExpression_inALoop(); |
286 } | 276 } |
287 | 277 |
288 @override | 278 @override |
289 @failingTest | 279 @failingTest |
290 void test_continueWithoutLabelInCase_error() { | 280 void test_continueWithoutLabelInCase_error() { |
| 281 // TODO(brianwilkerson) Wrong errors: |
| 282 // Expected 1 errors of type ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
found 0 |
291 super.test_continueWithoutLabelInCase_error(); | 283 super.test_continueWithoutLabelInCase_error(); |
292 } | 284 } |
293 | 285 |
294 @override | 286 @override |
295 @failingTest | 287 @failingTest |
296 void test_continueWithoutLabelInCase_noError() { | |
297 super.test_continueWithoutLabelInCase_noError(); | |
298 } | |
299 | |
300 @override | |
301 @failingTest | |
302 void test_continueWithoutLabelInCase_noError_switchInLoop() { | |
303 super.test_continueWithoutLabelInCase_noError_switchInLoop(); | |
304 } | |
305 | |
306 @override | |
307 @failingTest | |
308 void test_covariantAfterVar() { | 288 void test_covariantAfterVar() { |
| 289 // TODO(brianwilkerson) Wrong errors: |
| 290 // Expected 1 errors of type ParserErrorCode.COVARIANT_AFTER_VAR, found 0; |
| 291 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (4) |
309 super.test_covariantAfterVar(); | 292 super.test_covariantAfterVar(); |
310 } | 293 } |
311 | 294 |
312 @override | 295 @override |
313 @failingTest | 296 @failingTest |
314 void test_covariantAndStatic() { | 297 void test_covariantAndStatic() { |
| 298 // TODO(brianwilkerson) Wrong errors: |
| 299 // Expected 1 errors of type ParserErrorCode.COVARIANT_AND_STATIC, found 0; |
| 300 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (10) |
315 super.test_covariantAndStatic(); | 301 super.test_covariantAndStatic(); |
316 } | 302 } |
317 | 303 |
318 @override | 304 @override |
319 @failingTest | 305 @failingTest |
320 void test_covariantConstructor() { | 306 void test_covariantConstructor() { |
| 307 // TODO(brianwilkerson) Wrong errors: |
| 308 // Expected 1 errors of type ParserErrorCode.COVARIANT_CONSTRUCTOR, found 0; |
| 309 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (10) |
321 super.test_covariantConstructor(); | 310 super.test_covariantConstructor(); |
322 } | 311 } |
323 | 312 |
324 @override | 313 @override |
325 @failingTest | 314 @failingTest |
326 void test_covariantMember_getter_noReturnType() { | 315 void test_covariantMember_getter_noReturnType() { |
| 316 // TODO(brianwilkerson) Wrong errors: |
| 317 // Expected 1 errors of type ParserErrorCode.COVARIANT_MEMBER, found 0; |
| 318 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (7) |
327 super.test_covariantMember_getter_noReturnType(); | 319 super.test_covariantMember_getter_noReturnType(); |
328 } | 320 } |
329 | 321 |
330 @override | 322 @override |
331 @failingTest | 323 @failingTest |
332 void test_covariantMember_getter_returnType() { | 324 void test_covariantMember_getter_returnType() { |
| 325 // TODO(brianwilkerson) Wrong errors: |
| 326 // Expected 1 errors of type ParserErrorCode.COVARIANT_MEMBER, found 0; |
| 327 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (7) |
333 super.test_covariantMember_getter_returnType(); | 328 super.test_covariantMember_getter_returnType(); |
334 } | 329 } |
335 | 330 |
336 @override | 331 @override |
337 @failingTest | 332 @failingTest |
338 void test_covariantMember_method() { | 333 void test_covariantMember_method() { |
| 334 // TODO(brianwilkerson) Wrong errors: |
| 335 // Expected 1 errors of type ParserErrorCode.COVARIANT_MEMBER, found 0; |
| 336 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (0) |
339 super.test_covariantMember_method(); | 337 super.test_covariantMember_method(); |
340 } | 338 } |
341 | 339 |
342 @override | 340 @override |
343 @failingTest | 341 @failingTest |
344 void test_covariantTopLevelDeclaration_class() { | 342 void test_covariantTopLevelDeclaration_class() { |
| 343 // TODO(brianwilkerson) Does not recover. |
| 344 // type 'FunctionDeclarationImpl' is not a subtype of type 'ClassDeclarati
on' of 'member' where |
| 345 // FunctionDeclarationImpl is from package:analyzer/src/dart/ast/ast.dar
t |
| 346 // ClassDeclaration is from package:analyzer/dart/ast/ast.dart |
| 347 // |
| 348 // test/generated/parser_test.dart 2418:31 Fast
aParserTestCase&ErrorParserTestMixin.test_covariantTopLevelDeclaration_class |
345 super.test_covariantTopLevelDeclaration_class(); | 349 super.test_covariantTopLevelDeclaration_class(); |
346 } | 350 } |
347 | 351 |
348 @override | 352 @override |
349 @failingTest | 353 @failingTest |
350 void test_covariantTopLevelDeclaration_enum() { | 354 void test_covariantTopLevelDeclaration_enum() { |
| 355 // TODO(brianwilkerson) Does not recover. |
| 356 // type 'FunctionDeclarationImpl' is not a subtype of type 'EnumDeclaratio
n' of 'member' where |
| 357 // FunctionDeclarationImpl is from package:analyzer/src/dart/ast/ast.dart |
| 358 // EnumDeclaration is from package:analyzer/dart/ast/ast.dart |
| 359 // |
| 360 // test/generated/parser_test.dart 2426:30 Fast
aParserTestCase&ErrorParserTestMixin.test_covariantTopLevelDeclaration_enum |
351 super.test_covariantTopLevelDeclaration_enum(); | 361 super.test_covariantTopLevelDeclaration_enum(); |
352 } | 362 } |
353 | 363 |
354 @override | 364 @override |
355 @failingTest | 365 @failingTest |
356 void test_covariantTopLevelDeclaration_typedef() { | 366 void test_covariantTopLevelDeclaration_typedef() { |
| 367 // TODO(brianwilkerson) Wrong errors: |
| 368 // Expected 1 errors of type ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION
, found 0; |
| 369 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 11) |
357 super.test_covariantTopLevelDeclaration_typedef(); | 370 super.test_covariantTopLevelDeclaration_typedef(); |
358 } | 371 } |
359 | 372 |
360 @override | 373 @override |
361 @failingTest | 374 @failingTest |
362 void test_defaultValueInFunctionType_named_colon() { | 375 void test_defaultValueInFunctionType_named_colon() { |
| 376 // TODO(brianwilkerson) Wrong errors: |
| 377 // Expected 1 errors of type ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
found 0 |
363 super.test_defaultValueInFunctionType_named_colon(); | 378 super.test_defaultValueInFunctionType_named_colon(); |
364 } | 379 } |
365 | 380 |
366 @override | 381 @override |
367 @failingTest | 382 @failingTest |
368 void test_defaultValueInFunctionType_named_equal() { | 383 void test_defaultValueInFunctionType_named_equal() { |
| 384 // TODO(brianwilkerson) Wrong errors: |
| 385 // Expected 1 errors of type ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
found 0 |
369 super.test_defaultValueInFunctionType_named_equal(); | 386 super.test_defaultValueInFunctionType_named_equal(); |
370 } | 387 } |
371 | 388 |
372 @override | 389 @override |
373 @failingTest | 390 @failingTest |
374 void test_defaultValueInFunctionType_positional() { | 391 void test_defaultValueInFunctionType_positional() { |
| 392 // TODO(brianwilkerson) Wrong errors: |
| 393 // Expected 1 errors of type ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
found 0 |
375 super.test_defaultValueInFunctionType_positional(); | 394 super.test_defaultValueInFunctionType_positional(); |
376 } | 395 } |
377 | 396 |
378 @override | 397 @override |
379 @failingTest | 398 @failingTest |
380 void test_directiveAfterDeclaration_classBeforeDirective() { | 399 void test_directiveAfterDeclaration_classBeforeDirective() { |
| 400 // TODO(brianwilkerson) Wrong errors: |
| 401 // Expected 1 errors of type ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, fo
und 0 |
381 super.test_directiveAfterDeclaration_classBeforeDirective(); | 402 super.test_directiveAfterDeclaration_classBeforeDirective(); |
382 } | 403 } |
383 | 404 |
384 @override | 405 @override |
385 @failingTest | 406 @failingTest |
386 void test_directiveAfterDeclaration_classBetweenDirectives() { | 407 void test_directiveAfterDeclaration_classBetweenDirectives() { |
387 super.test_directiveAfterDeclaration_classBetweenDirectives(); | 408 super.test_directiveAfterDeclaration_classBetweenDirectives(); |
388 } | 409 } |
389 | 410 |
390 @override | 411 @override |
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 | 2535 |
2515 @override | 2536 @override |
2516 @failingTest | 2537 @failingTest |
2517 void test_parseFormalParameterList_prefixedType_partial2() { | 2538 void test_parseFormalParameterList_prefixedType_partial2() { |
2518 super.test_parseFormalParameterList_prefixedType_partial2(); | 2539 super.test_parseFormalParameterList_prefixedType_partial2(); |
2519 } | 2540 } |
2520 | 2541 |
2521 @override | 2542 @override |
2522 @failingTest | 2543 @failingTest |
2523 void test_parseNormalFormalParameter_field_const_noType() { | 2544 void test_parseNormalFormalParameter_field_const_noType() { |
2524 // TODO(brianwilkerson) Extra error: | 2545 // TODO(brianwilkerson) Wrong errors: |
2525 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) | 2546 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) |
2526 super.test_parseNormalFormalParameter_field_const_noType(); | 2547 super.test_parseNormalFormalParameter_field_const_noType(); |
2527 } | 2548 } |
2528 | 2549 |
2529 @failingTest | 2550 @failingTest |
2530 void test_parseNormalFormalParameter_field_const_noType2() { | 2551 void test_parseNormalFormalParameter_field_const_noType2() { |
2531 // TODO(danrubel): should not be generating an error | 2552 // TODO(danrubel): should not be generating an error |
2532 super.test_parseNormalFormalParameter_field_const_noType(); | 2553 super.test_parseNormalFormalParameter_field_const_noType(); |
2533 assertNoErrors(); | 2554 assertNoErrors(); |
2534 } | 2555 } |
2535 | 2556 |
2536 @override | 2557 @override |
2537 @failingTest | 2558 @failingTest |
2538 void test_parseNormalFormalParameter_field_const_type() { | 2559 void test_parseNormalFormalParameter_field_const_type() { |
2539 // TODO(brianwilkerson) Extra error: | 2560 // TODO(brianwilkerson) Wrong errors: |
2540 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) | 2561 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) |
2541 super.test_parseNormalFormalParameter_field_const_type(); | 2562 super.test_parseNormalFormalParameter_field_const_type(); |
2542 } | 2563 } |
2543 | 2564 |
2544 @failingTest | 2565 @failingTest |
2545 void test_parseNormalFormalParameter_field_const_type2() { | 2566 void test_parseNormalFormalParameter_field_const_type2() { |
2546 // TODO(danrubel): should not be generating an error | 2567 // TODO(danrubel): should not be generating an error |
2547 super.test_parseNormalFormalParameter_field_const_type(); | 2568 super.test_parseNormalFormalParameter_field_const_type(); |
2548 assertNoErrors(); | 2569 assertNoErrors(); |
2549 } | 2570 } |
2550 | 2571 |
2551 @override | 2572 @override |
2552 @failingTest | 2573 @failingTest |
2553 void test_parseNormalFormalParameter_simple_const_noType() { | 2574 void test_parseNormalFormalParameter_simple_const_noType() { |
2554 // TODO(brianwilkerson) Extra error: | 2575 // TODO(brianwilkerson) Wrong errors: |
2555 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) | 2576 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) |
2556 super.test_parseNormalFormalParameter_simple_const_noType(); | 2577 super.test_parseNormalFormalParameter_simple_const_noType(); |
2557 } | 2578 } |
2558 | 2579 |
2559 @failingTest | 2580 @failingTest |
2560 void test_parseNormalFormalParameter_simple_const_noType2() { | 2581 void test_parseNormalFormalParameter_simple_const_noType2() { |
2561 // TODO(danrubel): should not be generating an error | 2582 // TODO(danrubel): should not be generating an error |
2562 super.test_parseNormalFormalParameter_simple_const_noType(); | 2583 super.test_parseNormalFormalParameter_simple_const_noType(); |
2563 assertNoErrors(); | 2584 assertNoErrors(); |
2564 } | 2585 } |
2565 | 2586 |
2566 @override | 2587 @override |
2567 @failingTest | 2588 @failingTest |
2568 void test_parseNormalFormalParameter_simple_const_type() { | 2589 void test_parseNormalFormalParameter_simple_const_type() { |
2569 // TODO(brianwilkerson) Extra error: | 2590 // TODO(brianwilkerson) Wrong errors: |
2570 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) | 2591 // Expected 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (1
) |
2571 super.test_parseNormalFormalParameter_simple_const_type(); | 2592 super.test_parseNormalFormalParameter_simple_const_type(); |
2572 } | 2593 } |
2573 | 2594 |
2574 @failingTest | 2595 @failingTest |
2575 void test_parseNormalFormalParameter_simple_const_type2() { | 2596 void test_parseNormalFormalParameter_simple_const_type2() { |
2576 // TODO(danrubel): should not be generating an error | 2597 // TODO(danrubel): should not be generating an error |
2577 super.test_parseNormalFormalParameter_simple_const_type(); | 2598 super.test_parseNormalFormalParameter_simple_const_type(); |
2578 assertNoErrors(); | 2599 assertNoErrors(); |
2579 } | 2600 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 _eventListener.expectEmpty(); | 2732 _eventListener.expectEmpty(); |
2712 return result; | 2733 return result; |
2713 } | 2734 } |
2714 | 2735 |
2715 @override | 2736 @override |
2716 Configuration parseConfiguration() { | 2737 Configuration parseConfiguration() { |
2717 return _run((parser) => parser.parseConditionalUri) as Configuration; | 2738 return _run((parser) => parser.parseConditionalUri) as Configuration; |
2718 } | 2739 } |
2719 | 2740 |
2720 @override | 2741 @override |
| 2742 FormalParameterList parseFormalParameterList({bool inFunctionType: false}) { |
| 2743 return _run((parser) => (token) => parser.parseFormalParameters( |
| 2744 token, |
| 2745 inFunctionType |
| 2746 ? fasta.MemberKind.GeneralizedFunctionType |
| 2747 : fasta.MemberKind.StaticMethod)) as FormalParameterList; |
| 2748 } |
| 2749 |
| 2750 @override |
2721 FunctionBody parseFunctionBody( | 2751 FunctionBody parseFunctionBody( |
2722 bool mayBeEmpty, ParserErrorCode emptyErrorCode, bool inExpression) { | 2752 bool mayBeEmpty, ParserErrorCode emptyErrorCode, bool inExpression) { |
2723 return _run((parser) => (token) => | 2753 return _run((parser) => (token) => |
2724 parser.parseFunctionBody(token, inExpression, mayBeEmpty)) | 2754 parser.parseFunctionBody(token, inExpression, mayBeEmpty)) |
2725 as FunctionBody; | 2755 as FunctionBody; |
2726 } | 2756 } |
2727 | 2757 |
2728 @override | 2758 @override |
2729 Statement parseStatement2() { | 2759 Statement parseStatement2() { |
2730 return _run((parser) => parser.parseStatement) as Statement; | 2760 return _run((parser) => parser.parseStatement) as Statement; |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 @override | 3089 @override |
3060 @failingTest | 3090 @failingTest |
3061 void test_conditionalExpression_missingThen() { | 3091 void test_conditionalExpression_missingThen() { |
3062 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3092 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3063 super.test_conditionalExpression_missingThen(); | 3093 super.test_conditionalExpression_missingThen(); |
3064 } | 3094 } |
3065 | 3095 |
3066 @override | 3096 @override |
3067 @failingTest | 3097 @failingTest |
3068 void test_declarationBeforeDirective() { | 3098 void test_declarationBeforeDirective() { |
3069 // TODO(brianwilkerson) Missing error: | 3099 // TODO(brianwilkerson) Wrong errors: |
3070 // Expected 1 errors of type ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, fo
und 0 | 3100 // Expected 1 errors of type ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, fo
und 0 |
3071 super.test_declarationBeforeDirective(); | 3101 super.test_declarationBeforeDirective(); |
3072 } | 3102 } |
3073 | 3103 |
3074 @override | 3104 @override |
3075 @failingTest | 3105 @failingTest |
3076 void test_equalityExpression_missing_LHS() { | 3106 void test_equalityExpression_missing_LHS() { |
3077 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3107 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3078 super.test_equalityExpression_missing_LHS(); | 3108 super.test_equalityExpression_missing_LHS(); |
3079 } | 3109 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3130 @override | 3160 @override |
3131 @failingTest | 3161 @failingTest |
3132 void test_expressionList_multiple_middle() { | 3162 void test_expressionList_multiple_middle() { |
3133 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3163 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3134 super.test_expressionList_multiple_middle(); | 3164 super.test_expressionList_multiple_middle(); |
3135 } | 3165 } |
3136 | 3166 |
3137 @override | 3167 @override |
3138 @failingTest | 3168 @failingTest |
3139 void test_expressionList_multiple_start() { | 3169 void test_expressionList_multiple_start() { |
3140 // TODO(brianwilkerson) Missing error: | 3170 // TODO(brianwilkerson) Wrong errors: |
3141 // Expected 1 errors of type ParserErrorCode.MISSING_IDENTIFIER, found 0 | 3171 // Expected 1 errors of type ParserErrorCode.MISSING_IDENTIFIER, found 0 |
3142 super.test_expressionList_multiple_start(); | 3172 super.test_expressionList_multiple_start(); |
3143 } | 3173 } |
3144 | 3174 |
3145 @override | 3175 @override |
3146 @failingTest | 3176 @failingTest |
3147 void test_functionExpression_in_ConstructorFieldInitializer() { | 3177 void test_functionExpression_in_ConstructorFieldInitializer() { |
3148 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3178 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3149 super.test_functionExpression_in_ConstructorFieldInitializer(); | 3179 super.test_functionExpression_in_ConstructorFieldInitializer(); |
3150 } | 3180 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3205 // package:front_end/src/fasta/parser/parser.dart 1942:14 Pars
er.parseInitializers | 3235 // package:front_end/src/fasta/parser/parser.dart 1942:14 Pars
er.parseInitializers |
3206 // package:front_end/src/fasta/parser/parser.dart 1923:14 Pars
er.parseInitializersOpt | 3236 // package:front_end/src/fasta/parser/parser.dart 1923:14 Pars
er.parseInitializersOpt |
3207 // package:front_end/src/fasta/parser/parser.dart 2412:13 Pars
er.parseMethod | 3237 // package:front_end/src/fasta/parser/parser.dart 2412:13 Pars
er.parseMethod |
3208 // package:front_end/src/fasta/parser/parser.dart 2316:11 Pars
er.parseMember | 3238 // package:front_end/src/fasta/parser/parser.dart 2316:11 Pars
er.parseMember |
3209 super.test_incomplete_constructorInitializers_missingEquals(); | 3239 super.test_incomplete_constructorInitializers_missingEquals(); |
3210 } | 3240 } |
3211 | 3241 |
3212 @override | 3242 @override |
3213 @failingTest | 3243 @failingTest |
3214 void test_incomplete_constructorInitializers_variable() { | 3244 void test_incomplete_constructorInitializers_variable() { |
3215 // TODO(brianwilkerson) Missing error: | 3245 // TODO(brianwilkerson) Wrong errors: |
3216 // Expected 1 errors of type ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZ
ER, found 0 | 3246 // Expected 1 errors of type ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZ
ER, found 0 |
3217 super.test_incomplete_constructorInitializers_variable(); | 3247 super.test_incomplete_constructorInitializers_variable(); |
3218 } | 3248 } |
3219 | 3249 |
3220 @override | 3250 @override |
3221 @failingTest | 3251 @failingTest |
3222 void test_incomplete_returnType() { | 3252 void test_incomplete_returnType() { |
3223 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3253 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3224 super.test_incomplete_returnType(); | 3254 super.test_incomplete_returnType(); |
3225 } | 3255 } |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 @override | 3507 @override |
3478 @failingTest | 3508 @failingTest |
3479 void test_missingIdentifier_afterAnnotation() { | 3509 void test_missingIdentifier_afterAnnotation() { |
3480 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3510 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
3481 super.test_missingIdentifier_afterAnnotation(); | 3511 super.test_missingIdentifier_afterAnnotation(); |
3482 } | 3512 } |
3483 | 3513 |
3484 @override | 3514 @override |
3485 @failingTest | 3515 @failingTest |
3486 void test_missingSemicolon_varialeDeclarationList() { | 3516 void test_missingSemicolon_varialeDeclarationList() { |
3487 // TODO(brianwilkerson) wrong errors: | 3517 // TODO(brianwilkerson) Wrong errors: |
3488 // Expected 1 errors of type ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
, found 0; | 3518 // Expected 1 errors of type ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
, found 0; |
3489 // 1 errors of type ParserErrorCode.EXPECTED_TOKEN, found 0; | 3519 // 1 errors of type ParserErrorCode.EXPECTED_TOKEN, found 0; |
3490 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (8) | 3520 // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 1 (8) |
3491 super.test_missingSemicolon_varialeDeclarationList(); | 3521 super.test_missingSemicolon_varialeDeclarationList(); |
3492 } | 3522 } |
3493 | 3523 |
3494 @override | 3524 @override |
3495 @failingTest | 3525 @failingTest |
3496 void test_multiplicativeExpression_missing_LHS() { | 3526 void test_multiplicativeExpression_missing_LHS() { |
3497 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken | 3527 // TODO(brianwilkerson) reportUnrecoverableErrorWithToken |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4107 @failingTest | 4137 @failingTest |
4108 void test_parseModifiers_var() { | 4138 void test_parseModifiers_var() { |
4109 // TODO(brianwilkerson) exception: | 4139 // TODO(brianwilkerson) exception: |
4110 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseModif
iers'. | 4140 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseModif
iers'. |
4111 super.test_parseModifiers_var(); | 4141 super.test_parseModifiers_var(); |
4112 } | 4142 } |
4113 | 4143 |
4114 @override | 4144 @override |
4115 @failingTest | 4145 @failingTest |
4116 void test_parseReturnType_void() { | 4146 void test_parseReturnType_void() { |
4117 // TODO(brianwilkerson) Test isn't passing in enough context. | |
4118 // Type 'void' can't be used here because it isn't a return type. | |
4119 super.test_parseReturnType_void(); | 4147 super.test_parseReturnType_void(); |
4120 } | 4148 } |
4121 | 4149 |
4122 @override | 4150 @override |
4123 @failingTest | 4151 @failingTest |
4124 void test_parseTypeArgumentList_empty() { | 4152 void test_parseTypeArgumentList_empty() { |
4125 // TODO(brianwilkerson) Does not recover from an empty list. | 4153 // TODO(brianwilkerson) Does not recover from an empty list. |
4126 super.test_parseTypeArgumentList_empty(); | 4154 super.test_parseTypeArgumentList_empty(); |
4127 } | 4155 } |
4128 | 4156 |
4129 @override | 4157 @override |
4130 @failingTest | 4158 @failingTest |
4131 void test_parseTypeArgumentList_nested_withComment_double() { | 4159 void test_parseTypeArgumentList_nested_withComment_double() { |
4132 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into | 4160 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into |
4133 // two tokens. | 4161 // two tokens. |
4134 super.test_parseTypeArgumentList_nested_withComment_double(); | 4162 super.test_parseTypeArgumentList_nested_withComment_double(); |
4135 } | 4163 } |
4136 | 4164 |
4137 @override | 4165 @override |
4138 @failingTest | 4166 @failingTest |
4139 void test_parseTypeArgumentList_nested_withComment_tripple() { | 4167 void test_parseTypeArgumentList_nested_withComment_tripple() { |
4140 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into | 4168 // TODO(brianwilkerson) Does not capture comment when splitting '>>' into |
4141 // two tokens. | 4169 // two tokens. |
4142 super.test_parseTypeArgumentList_nested_withComment_tripple(); | 4170 super.test_parseTypeArgumentList_nested_withComment_tripple(); |
4143 } | 4171 } |
4144 | 4172 |
4145 @override | 4173 @override |
4146 @failingTest | 4174 @failingTest |
4147 void test_parseTypeParameterList_parameterizedWithTrailingEquals() { | 4175 void test_parseTypeParameterList_parameterizedWithTrailingEquals() { |
4148 // TODO(brianwilkerson) reportUnrecoverableError | |
4149 super.test_parseTypeParameterList_parameterizedWithTrailingEquals(); | 4176 super.test_parseTypeParameterList_parameterizedWithTrailingEquals(); |
4150 } | 4177 } |
4151 | 4178 |
4152 @override | 4179 @override |
4153 @failingTest | 4180 @failingTest |
4154 void test_parseTypeParameterList_single() { | 4181 void test_parseTypeParameterList_single() { |
4155 // TODO(brianwilkerson) Does not use all tokens. | 4182 // TODO(brianwilkerson) Does not use all tokens. |
4156 super.test_parseTypeParameterList_single(); | 4183 super.test_parseTypeParameterList_single(); |
4157 } | 4184 } |
4158 | 4185 |
4159 @override | 4186 @override |
4160 @failingTest | 4187 @failingTest |
4161 void test_parseTypeParameterList_withTrailingEquals() { | 4188 void test_parseTypeParameterList_withTrailingEquals() { |
4162 // TODO(brianwilkerson) reportUnrecoverableError | |
4163 super.test_parseTypeParameterList_withTrailingEquals(); | 4189 super.test_parseTypeParameterList_withTrailingEquals(); |
4164 } | 4190 } |
4165 | 4191 |
4166 @override | 4192 @override |
4167 @failingTest | 4193 @failingTest |
4168 void test_parseVariableDeclaration_equals() { | 4194 void test_parseVariableDeclaration_equals() { |
4169 // TODO(brianwilkerson) exception: | 4195 // TODO(brianwilkerson) exception: |
4170 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseVaria
bleDeclaration'. | 4196 // NoSuchMethodError: Class 'ParserProxy' has no instance method 'parseVaria
bleDeclaration'. |
4171 super.test_parseVariableDeclaration_equals(); | 4197 super.test_parseVariableDeclaration_equals(); |
4172 } | 4198 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4354 @override | 4380 @override |
4355 @failingTest | 4381 @failingTest |
4356 void test_parseDirectives_mixed() { | 4382 void test_parseDirectives_mixed() { |
4357 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to | 4383 // TODO(paulberry,ahe): This test verifies the analyzer parser's ability to |
4358 // stop parsing as soon as the first non-directive is encountered; this is | 4384 // stop parsing as soon as the first non-directive is encountered; this is |
4359 // useful for quickly traversing an import graph. Consider adding a similar | 4385 // useful for quickly traversing an import graph. Consider adding a similar |
4360 // ability to Fasta's parser. | 4386 // ability to Fasta's parser. |
4361 super.test_parseDirectives_mixed(); | 4387 super.test_parseDirectives_mixed(); |
4362 } | 4388 } |
4363 } | 4389 } |
OLD | NEW |