| Index: dart/tests/compiler/dart2js/return_type_inferer_test.dart
|
| diff --git a/dart/tests/compiler/dart2js/return_type_inferer_test.dart b/dart/tests/compiler/dart2js/return_type_inferer_test.dart
|
| index cc83fb1cd45c592bdfd3572dacefa87c9119ae94..1d0ce1921e445789ba9f98dc202e5125a26059a3 100644
|
| --- a/dart/tests/compiler/dart2js/return_type_inferer_test.dart
|
| +++ b/dart/tests/compiler/dart2js/return_type_inferer_test.dart
|
| @@ -2,22 +2,9 @@
|
| // 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/ssa/ssa.dart");
|
|
|
| #import('compiler_helper.dart');
|
| -#import('parser_helper.dart');
|
| -
|
| -void compileAndFind(String code,
|
| - String functionName,
|
| - check(compiler, element)) {
|
| - Uri uri = new Uri.fromComponents(scheme: 'source');
|
| - var compiler = compilerFor(code, uri);
|
| - compiler.runCompiler(uri);
|
| - var fun = findElement(compiler, functionName);
|
| - return check(compiler.backend, fun);
|
| -}
|
|
|
| final String TEST_ONE = @"""
|
| f(p) => p;
|
| @@ -71,10 +58,11 @@ final String TEST_TEN = @"""
|
| """;
|
|
|
| void runTest(String test, [HType expectedType = HType.UNKNOWN]) {
|
| - compileAndFind(
|
| + compileAndCheck(
|
| test,
|
| 'f',
|
| - (backend, x) {
|
| + (compiler, x) {
|
| + var backend = compiler.backend;
|
| HType type =
|
| backend.optimisticReturnTypesWithRecompilationOnTypeChange(null, x);
|
| Expect.equals(expectedType, type);
|
|
|