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

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

Issue 1363993004: Report info messages together with their error, warning, or hint. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 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/related_types.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 1f4cae97b96767b5ca81252990f78060462f8f74..17584fb3e2087381d4ab7ab2dbd837481eb7dce9 100644
--- a/tests/compiler/dart2js/parser_test.dart
+++ b/tests/compiler/dart2js/parser_test.dart
@@ -292,27 +292,32 @@ void testOperatorParse() {
Expect.isNull(function.getOrSet);
}
-class Collector implements DiagnosticListener {
+class Collector extends DiagnosticListener {
int token = -1;
- void reportFatalError(Token token,
- messageKind,
- [Map arguments = const {}]) {
+ void reportFatalError(Token token) {
this.token = token.kind;
throw this;
}
- void reportError(Token token,
- messageKind,
- [Map arguments = const {}]) {
- reportFatalError(token, messageKind, arguments);
+ void reportError(
+ DiagnosticMessage message,
+ [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
+ reportFatalError(message.spannable);
}
void log(message) {
print(message);
}
- noSuchMethod(Invocation invocation) => throw 'unsupported operation';
+ noSuchMethod(Invocation invocation) {
+ throw 'unsupported operation';
+ }
+
+ @override
+ DiagnosticMessage createMessage(spannable, messageKind, [arguments]) {
+ return new DiagnosticMessage(null, spannable, null);
+ }
}
void testMissingCloseParen() {
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/related_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698