Index: tests/compiler/dart2js/simple_inferrer_try_catch_test.dart |
diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart |
index 8e47f93c0600afb81d7a376d713db332bff11c96..aa29c720b87e8fe5001d3c58a818940d8e63408f 100644 |
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart |
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_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 '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' |
show TypeMask; |
@@ -166,32 +167,32 @@ main() { |
void main() { |
Uri uri = new Uri(scheme: 'source'); |
var compiler = compilerFor(TEST, uri); |
- compiler.runCompiler(uri); |
- var typesTask = compiler.typesTask; |
- var typesInferrer = typesTask.typesInferrer; |
- |
- checkReturn(String name, type) { |
- var element = findElement(compiler, name); |
- Expect.equals(type, |
- typesInferrer.getReturnTypeOfElement(element).simplify(compiler)); |
- } |
+ asyncTest(() => compiler.runCompiler(uri).then((_) { |
+ var typesTask = compiler.typesTask; |
+ var typesInferrer = typesTask.typesInferrer; |
+ |
+ checkReturn(String name, type) { |
+ var element = findElement(compiler, name); |
+ Expect.equals(type, |
+ typesInferrer.getReturnTypeOfElement(element).simplify(compiler)); |
+ } |
- checkReturn('returnInt1', typesTask.intType); |
- checkReturn('returnInt2', typesTask.intType); |
- checkReturn('returnInt3', typesTask.intType); |
- checkReturn('returnInt4', typesTask.intType); |
- checkReturn('returnInt5', typesTask.intType); |
- checkReturn('returnInt6', |
- new TypeMask.nonNullSubtype(compiler.intClass.rawType)); |
- checkReturn('returnInt7', typesTask.intType); |
- |
- var subclassOfInterceptor = |
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'); |
- |
- checkReturn('returnDyn1', subclassOfInterceptor); |
- checkReturn('returnDyn2', subclassOfInterceptor); |
- checkReturn('returnDyn3', subclassOfInterceptor); |
- checkReturn('returnDyn4', subclassOfInterceptor); |
- checkReturn('returnDyn5', subclassOfInterceptor); |
- checkReturn('returnDyn6', typesTask.dynamicType); |
+ checkReturn('returnInt1', typesTask.intType); |
+ checkReturn('returnInt2', typesTask.intType); |
+ checkReturn('returnInt3', typesTask.intType); |
+ checkReturn('returnInt4', typesTask.intType); |
+ checkReturn('returnInt5', typesTask.intType); |
+ checkReturn('returnInt6', |
+ new TypeMask.nonNullSubtype(compiler.intClass.rawType)); |
+ |
+ var subclassOfInterceptor = |
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'); |
+ |
+ checkReturn('returnDyn1', subclassOfInterceptor); |
+ checkReturn('returnDyn2', subclassOfInterceptor); |
+ checkReturn('returnDyn3', subclassOfInterceptor); |
+ checkReturn('returnDyn4', subclassOfInterceptor); |
+ checkReturn('returnDyn5', subclassOfInterceptor); |
+ checkReturn('returnDyn6', typesTask.dynamicType); |
+ })); |
} |