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

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

Issue 1248483008: Split MessageKind into a MessageKind key and a MessageTemplate. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 5 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/compiler_helper.dart ('k') | tests/compiler/dart2js/import_mirrors_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 581489cac5686353b9710cbfc55ac362340863d5..6e16da62bae554545a7fb53062cdeda67f895ee5 100644
--- a/tests/compiler/dart2js/compiler_test.dart
+++ b/tests/compiler/dart2js/compiler_test.dart
@@ -25,7 +25,8 @@ class CallbackMockCompiler extends MockCompiler {
MessageKind messageKind,
[Map arguments = const {}]) {
if (onWarning != null) {
- onWarning(this, node, messageKind.message(arguments));
+ MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
+ onWarning(this, node, template.message(arguments));
}
super.reportWarning(node, messageKind, arguments);
}
@@ -34,7 +35,8 @@ class CallbackMockCompiler extends MockCompiler {
MessageKind messageKind,
[Map arguments = const {}]) {
if (onError != null) {
- onError(this, node, messageKind.message(arguments));
+ MessageTemplate template = MessageTemplate.TEMPLATES[messageKind];
+ onError(this, node, template.message(arguments));
}
super.reportError(node, messageKind, arguments);
}
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/compiler/dart2js/import_mirrors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698