| Index: tests/compiler/dart2js/resolver_test.dart
|
| diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
|
| index b6044da86b667d5cab6eff2c330124f813c8201e..629ddc061fe679719688493ecf61393f79e3a52a 100644
|
| --- a/tests/compiler/dart2js/resolver_test.dart
|
| +++ b/tests/compiler/dart2js/resolver_test.dart
|
| @@ -2,10 +2,13 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +#import('dart:uri');
|
| +
|
| #import("../../../lib/compiler/implementation/leg.dart");
|
| #import("../../../lib/compiler/implementation/elements/elements.dart");
|
| #import("../../../lib/compiler/implementation/tree/tree.dart");
|
| #import("../../../lib/compiler/implementation/util/util.dart");
|
| +#import("compiler_helper.dart");
|
| #import("mock_compiler.dart");
|
| #import("parser_helper.dart");
|
|
|
| @@ -69,6 +72,7 @@ main() {
|
| testThis();
|
| testSuperCalls();
|
| testTypeVariables();
|
| + testToString();
|
| }
|
|
|
| testTypeVariables() {
|
| @@ -718,3 +722,18 @@ List<String> asSortedStrings(Link link) {
|
| result.sort((s1, s2) => s1.compareTo(s2));
|
| return result;
|
| }
|
| +
|
| +testToString() {
|
| + Uri uri = new Uri.fromComponents(scheme: 'source');
|
| + MockCompiler compiler = compilerFor(
|
| + @"class C { toString() => 'C'; } main() { '${new C()}'; }",
|
| + uri);
|
| + compiler.runCompiler(uri);
|
| +
|
| + Element toStringMethod = findElement(compiler, 'C')
|
| + .lookupLocalMember(buildSourceString('toString'));
|
| + Expect.isNotNull(toStringMethod);
|
| +
|
| + Expect.isNotNull(
|
| + compiler.enqueuer.resolution.getCachedElements(toStringMethod));
|
| +}
|
|
|