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

Unified Diff: tests/compiler/dart2js/js_spec_string_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/exit_code_test.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_spec_string_test.dart
diff --git a/tests/compiler/dart2js/js_spec_string_test.dart b/tests/compiler/dart2js/js_spec_string_test.dart
index d86a4c7d26c20cace36b156a2b1156e9a0241031..a169bca256183689014af8f81d9712d7e5c77aa0 100644
--- a/tests/compiler/dart2js/js_spec_string_test.dart
+++ b/tests/compiler/dart2js/js_spec_string_test.dart
@@ -7,23 +7,32 @@
import 'package:expect/expect.dart';
import 'package:compiler/src/native/native.dart';
import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
import 'package:compiler/src/universe/side_effects.dart'
show SideEffects;
const OBJECT = 'Object';
const NULL = 'Null';
-class Listener implements DiagnosticListener {
+class Listener extends DiagnosticListener {
String errorMessage;
internalError(spannable, message) {
errorMessage = message;
throw "error";
}
- reportError(spannable, kind, [arguments]) {
- errorMessage = '$arguments'; // E.g. "{text: Duplicate tag 'new'.}"
+ reportError(message, [infos]) {
+
+ errorMessage =
+ '${message.message.arguments}'; // E.g. "{text: Duplicate tag 'new'.}"
throw "error";
}
+ @override
+ DiagnosticMessage createMessage(spannable, messageKind, [arguments]) {
+ return new DiagnosticMessage(null, spannable,
+ MessageTemplate.TEMPLATES[messageKind].message(arguments));
+ }
+
noSuchMethod(_) => null;
}
« no previous file with comments | « tests/compiler/dart2js/exit_code_test.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698