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

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

Issue 12082024: Use named arguments for messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 11 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/part_of_test.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 fbe3db25144825a3a3f2b4e53fff8cae88b37140..f8b6a0aeba2862a5436579630a4344c846c531ac 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -219,7 +219,7 @@ testLocalsOne() {
MockCompiler compiler = testLocals([["foo", false], ["foo", false]]);
Expect.equals(1, compiler.errors.length);
Expect.equals(
- new Message(MessageKind.DUPLICATE_DEFINITION, ['foo']),
+ new Message(MessageKind.DUPLICATE_DEFINITION, {'name': 'foo'}),
compiler.errors[0].message);
}
@@ -401,7 +401,7 @@ testTypeAnnotation() {
Node warningNode = compiler.warnings[0].node;
Expect.equals(
- new Message(MessageKind.CANNOT_RESOLVE_TYPE, ['Foo']),
+ new Message(MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'Foo'}),
compiler.warnings[0].message);
VariableDefinitions definition = compiler.parsedTree;
Expect.equals(warningNode, definition.type);
@@ -427,7 +427,8 @@ testSuperclass() {
// ClassResolverVisitor, and once from ClassSupertypeResolver. We
// should only the get the error once.
Expect.equals(2, compiler.errors.length);
- var cannotResolveBar = new Message(MessageKind.CANNOT_RESOLVE_TYPE, ['Bar']);
+ var cannotResolveBar = new Message(MessageKind.CANNOT_RESOLVE_TYPE,
+ {'typeName': 'Bar'});
Expect.equals(cannotResolveBar, compiler.errors[0].message);
Expect.equals(cannotResolveBar, compiler.errors[1].message);
compiler.clearErrors();
@@ -452,7 +453,7 @@ testVarSuperclass() {
compiler.resolveStatement("Foo bar;");
Expect.equals(1, compiler.errors.length);
Expect.equals(
- new Message(MessageKind.CANNOT_RESOLVE_TYPE, ['var']),
+ new Message(MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'var'}),
compiler.errors[0].message);
compiler.clearErrors();
}
@@ -463,7 +464,7 @@ testOneInterface() {
compiler.resolveStatement("Foo bar;");
Expect.equals(1, compiler.errors.length);
Expect.equals(
- new Message(MessageKind.CANNOT_RESOLVE_TYPE, ['bar']),
+ new Message(MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': 'bar'}),
compiler.errors[0].message);
compiler.clearErrors();
« no previous file with comments | « tests/compiler/dart2js/part_of_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698