Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: tests/compiler/dart2js/parser_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/part_of_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/part_of_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698