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

Unified Diff: tests/compiler/dart2js/resolver_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/parser_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index c25eb933877f03a6102bea9b110f187ec4c683b3..35c2dedc74a1d6b0dca99abdd53464421304c79a 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -308,7 +308,9 @@ Future testLocalsOne() {
.then((MockCompiler compiler) {
Expect.equals(1, compiler.errors.length);
Expect.equals(
- new Message(MessageKind.DUPLICATE_DEFINITION, {'name': 'foo'}, false),
+ new Message(
+ MessageTemplate.TEMPLATES[MessageKind.DUPLICATE_DEFINITION],
+ {'name': 'foo'}, false),
compiler.errors[0].message);
})], (f) => f());
}
@@ -491,7 +493,8 @@ Future testTypeAnnotation() {
Expect.equals(
new Message(
- MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'Foo'}, false),
+ MessageTemplate.TEMPLATES[MessageKind.CANNOT_RESOLVE_TYPE],
+ {'typeName': 'Foo'}, false),
compiler.warnings[0].message);
VariableDefinitions definition = compiler.parsedTree;
Expect.equals(warningNode, definition.type);
@@ -516,7 +519,8 @@ Future testSuperclass() {
compiler.parseScript("class Foo extends Bar {}");
compiler.resolveStatement("Foo bar;");
Expect.equals(1, compiler.errors.length);
- var cannotResolveBar = new Message(MessageKind.CANNOT_EXTEND_MALFORMED,
+ var cannotResolveBar = new Message(
+ MessageTemplate.TEMPLATES[MessageKind.CANNOT_EXTEND_MALFORMED],
{'className': 'Foo', 'malformedType': 'Bar'}, false);
Expect.equals(cannotResolveBar, compiler.errors[0].message);
compiler.clearMessages();
@@ -544,7 +548,8 @@ Future testVarSuperclass() {
Expect.equals(1, compiler.errors.length);
Expect.equals(
new Message(
- MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'var'}, false),
+ MessageTemplate.TEMPLATES[MessageKind.CANNOT_RESOLVE_TYPE],
+ {'typeName': 'var'}, false),
compiler.errors[0].message);
compiler.clearMessages();
});
@@ -557,7 +562,8 @@ Future testOneInterface() {
Expect.equals(1, compiler.errors.length);
Expect.equals(
new Message(
- MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'bar'}, false),
+ MessageTemplate.TEMPLATES[MessageKind.CANNOT_RESOLVE_TYPE],
+ {'typeName': 'bar'}, false),
compiler.errors[0].message);
compiler.clearMessages();
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698