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

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

Issue 10661029: Ensure interfaces are loaded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 4 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 | « dart/tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js/resolver_test.dart
diff --git a/dart/tests/compiler/dart2js/resolver_test.dart b/dart/tests/compiler/dart2js/resolver_test.dart
index b6044da86b667d5cab6eff2c330124f813c8201e..b0662000db0526546b0a99fbeed6b94798368d39 100644
--- a/dart/tests/compiler/dart2js/resolver_test.dart
+++ b/dart/tests/compiler/dart2js/resolver_test.dart
@@ -121,7 +121,7 @@ testTypeVariables() {
' bar() { g(Foo<T> f) {}; g(); }'
'}');
foo = compiler.mainApp.find(buildSourceString('Foo'));
- compiler.resolveClass(foo);
+ foo.ensureResolved(compiler);
foo.lookupLocalMember(buildSourceString('t')).computeType(compiler);;
foo.lookupLocalMember(buildSourceString('foo')).computeType(compiler);;
compiler.resolver.resolve(foo.lookupLocalMember(buildSourceString('bar')));
@@ -409,10 +409,13 @@ testSuperclass() {
MockCompiler compiler = new MockCompiler();
compiler.parseScript("class Foo extends Bar {}");
compiler.resolveStatement("Foo bar;");
- Expect.equals(1, compiler.errors.length);
- Expect.equals(
- new Message(MessageKind.CANNOT_RESOLVE_TYPE, ['Bar']),
- compiler.errors[0].message);
+ // TODO(ahe): We get the same error twice: once from
+ // 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']);
+ Expect.equals(cannotResolveBar, compiler.errors[0].message);
+ Expect.equals(cannotResolveBar, compiler.errors[1].message);
compiler.clearErrors();
compiler = new MockCompiler();
« no previous file with comments | « dart/tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698