| Index: tests/compiler/dart2js/parser_test.dart
|
| diff --git a/tests/compiler/dart2js/parser_test.dart b/tests/compiler/dart2js/parser_test.dart
|
| index 762d07417b9f82a026122bcf169f1bb940ceb18b..048745098276405e46c4e47aefa79eeeb38927c8 100644
|
| --- a/tests/compiler/dart2js/parser_test.dart
|
| +++ b/tests/compiler/dart2js/parser_test.dart
|
| @@ -304,8 +304,7 @@ class Collector extends DiagnosticReporter {
|
| throw this;
|
| }
|
|
|
| - void reportError(
|
| - DiagnosticMessage message,
|
| + void reportError(DiagnosticMessage message,
|
| [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
|
| reportFatalError(message.spannable);
|
| }
|
| @@ -319,24 +318,25 @@ class Collector extends DiagnosticReporter {
|
| }
|
|
|
| @override
|
| - DiagnosticMessage createMessage(
|
| - spannable, messageKind, [arguments = const {}]) {
|
| + DiagnosticMessage createMessage(spannable, messageKind,
|
| + [arguments = const {}]) {
|
| return new DiagnosticMessage(null, spannable, null);
|
| }
|
| }
|
|
|
| void testMissingCloseParen() {
|
| - final String source =
|
| -'''foo(x { // <= missing closing ")"
|
| + final String source = '''foo(x { // <= missing closing ")"
|
| return x;
|
| }''';
|
| parse() {
|
| parseMember(source, reporter: new Collector());
|
| }
|
| +
|
| check(Collector c) {
|
| Expect.equals(OPEN_CURLY_BRACKET_TOKEN, c.token);
|
| return true;
|
| }
|
| +
|
| Expect.throws(parse, check);
|
| }
|
|
|
| @@ -345,10 +345,12 @@ void testMissingCloseBraceInClass() {
|
| parse() {
|
| fullParseUnit(source, reporter: new Collector());
|
| }
|
| +
|
| check(Collector c) {
|
| Expect.equals(BAD_INPUT_TOKEN, c.token);
|
| return true;
|
| }
|
| +
|
| Expect.throws(parse, check);
|
| }
|
|
|
| @@ -357,10 +359,12 @@ void testUnmatchedAngleBracket() {
|
| parse() {
|
| fullParseUnit(source, reporter: new Collector());
|
| }
|
| +
|
| check(Collector c) {
|
| Expect.equals(LT_TOKEN, c.token);
|
| return true;
|
| }
|
| +
|
| Expect.throws(parse, check);
|
| }
|
|
|
|
|