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

Unified Diff: tests/compiler/dart2js/compiler_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/analyze_unused_dart2js_test.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/compiler_test.dart
diff --git a/tests/compiler/dart2js/compiler_test.dart b/tests/compiler/dart2js/compiler_test.dart
index d96f695b1f3c4ddbe5c19119b0dd627a4a681daf..3b1f425fa23914fb40997b98af1794c0637c395e 100644
--- a/tests/compiler/dart2js/compiler_test.dart
+++ b/tests/compiler/dart2js/compiler_test.dart
@@ -8,7 +8,7 @@ import "package:async_helper/async_helper.dart";
import "package:compiler/src/diagnostics/messages.dart";
import "package:compiler/src/elements/elements.dart";
import "package:compiler/src/resolution/members.dart";
-import "package:compiler/src/diagnostics/spannable.dart";
+import "package:compiler/src/diagnostics/diagnostic_listener.dart";
import "mock_compiler.dart";
@@ -21,24 +21,22 @@ class CallbackMockCompiler extends MockCompiler {
setOnError(var f) => onError = f;
setOnWarning(var f) => onWarning = f;
- void reportWarning(Spannable node,
- MessageKind messageKind,
- [Map arguments = const {}]) {
+ void reportWarning(
+ DiagnosticMessage message,
+ [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
if (onWarning != null) {
- MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
- onWarning(this, node, template.message(arguments));
+ onWarning(this, message.spannable, message.message);
}
- super.reportWarning(node, messageKind, arguments);
+ super.reportWarning(message, infos);
}
- void reportError(Spannable node,
- MessageKind messageKind,
- [Map arguments = const {}]) {
+ void reportError(
+ DiagnosticMessage message,
+ [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
if (onError != null) {
- MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
- onError(this, node, template.message(arguments));
+ onError(this, message.spannable, message.message);
}
- super.reportError(node, messageKind, arguments);
+ super.reportError(message, infos);
}
}
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | tests/compiler/dart2js/exit_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698