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; |
} |