OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import 'parser_helper.dart'; | 6 import 'parser_helper.dart'; |
7 import 'package:compiler/src/tree/tree.dart'; | 7 import 'package:compiler/src/tree/tree.dart'; |
8 | 8 |
9 void testStatement(String statement) { | 9 void testStatement(String statement) { |
10 Node node = parseStatement(statement); | 10 Node node = parseStatement(statement); |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 312 |
313 void log(message) { | 313 void log(message) { |
314 print(message); | 314 print(message); |
315 } | 315 } |
316 | 316 |
317 noSuchMethod(Invocation invocation) { | 317 noSuchMethod(Invocation invocation) { |
318 throw 'unsupported operation'; | 318 throw 'unsupported operation'; |
319 } | 319 } |
320 | 320 |
321 @override | 321 @override |
322 DiagnosticMessage createMessage(spannable, messageKind, [arguments]) { | 322 DiagnosticMessage createMessage( |
| 323 spannable, messageKind, [arguments = const {}]) { |
323 return new DiagnosticMessage(null, spannable, null); | 324 return new DiagnosticMessage(null, spannable, null); |
324 } | 325 } |
325 } | 326 } |
326 | 327 |
327 void testMissingCloseParen() { | 328 void testMissingCloseParen() { |
328 final String source = | 329 final String source = |
329 '''foo(x { // <= missing closing ")" | 330 '''foo(x { // <= missing closing ")" |
330 return x; | 331 return x; |
331 }'''; | 332 }'''; |
332 parse() { | 333 parse() { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 testConditionalExpression(); | 376 testConditionalExpression(); |
376 testNullOperators(); | 377 testNullOperators(); |
377 testAssignment(); | 378 testAssignment(); |
378 testIndex(); | 379 testIndex(); |
379 testPostfix(); | 380 testPostfix(); |
380 testOperatorParse(); | 381 testOperatorParse(); |
381 testMissingCloseParen(); | 382 testMissingCloseParen(); |
382 testMissingCloseBraceInClass(); | 383 testMissingCloseBraceInClass(); |
383 testUnmatchedAngleBracket(); | 384 testUnmatchedAngleBracket(); |
384 } | 385 } |
OLD | NEW |