| Index: tests/compiler/dart2js/simple_inferrer_and_or_test.dart
|
| diff --git a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
|
| index 22ec51a6ea0c7ccc4a8fc1cffff9910f8d52ae8c..19926f00f95269bf32af96cff9f785d8f61a8006 100644
|
| --- a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
|
| +++ b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
|
| @@ -3,6 +3,7 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| import 'package:expect/expect.dart';
|
| +import "package:async_helper/async_helper.dart";
|
| import 'compiler_helper.dart';
|
|
|
| const String TEST = """
|
| @@ -57,22 +58,23 @@ main() {
|
| void main() {
|
| Uri uri = new Uri(scheme: 'source');
|
| var compiler = compilerFor(TEST, uri);
|
| - compiler.runCompiler(uri);
|
| - var typesInferrer = compiler.typesTask.typesInferrer;
|
| + asyncTest(() => compiler.runCompiler(uri).then((_) {
|
| + var typesInferrer = compiler.typesTask.typesInferrer;
|
|
|
| - checkReturn(String name, type) {
|
| - var element = findElement(compiler, name);
|
| - Expect.equals(type,
|
| - typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
|
| - }
|
| + checkReturn(String name, type) {
|
| + var element = findElement(compiler, name);
|
| + Expect.equals(type,
|
| + typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
|
| + }
|
|
|
| - var subclassOfInterceptor =
|
| - findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
|
| + var subclassOfInterceptor =
|
| + findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
|
|
|
| - checkReturn('returnDyn1', subclassOfInterceptor);
|
| - checkReturn('returnDyn2', subclassOfInterceptor);
|
| - checkReturn('returnDyn3', subclassOfInterceptor);
|
| - checkReturn('returnDyn4', compiler.typesTask.dynamicType.nonNullable());
|
| - checkReturn('returnDyn5', compiler.typesTask.dynamicType.nonNullable());
|
| - checkReturn('returnDyn6', compiler.typesTask.dynamicType.nonNullable());
|
| + checkReturn('returnDyn1', subclassOfInterceptor);
|
| + checkReturn('returnDyn2', subclassOfInterceptor);
|
| + checkReturn('returnDyn3', subclassOfInterceptor);
|
| + checkReturn('returnDyn4', compiler.typesTask.dynamicType.nonNullable());
|
| + checkReturn('returnDyn5', compiler.typesTask.dynamicType.nonNullable());
|
| + checkReturn('returnDyn6', compiler.typesTask.dynamicType.nonNullable());
|
| + }));
|
| }
|
|
|