Index: tests/compiler/dart2js/simple_inferrer_final_field2_test.dart |
diff --git a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart |
index 75bf80373913bcd77e53668cae3ce5adb9b1d257..fa7b6f5dbce1ca67624ed92f9185459209cfc3e8 100644 |
--- a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart |
+++ b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart |
@@ -6,6 +6,7 @@ |
// infering types for fields. |
import 'package:expect/expect.dart'; |
+import "package:async_helper/async_helper.dart"; |
import 'compiler_helper.dart'; |
import 'parser_helper.dart'; |
@@ -26,15 +27,16 @@ main() { |
void main() { |
Uri uri = new Uri(scheme: 'source'); |
var compiler = compilerFor(TEST, uri); |
- compiler.runCompiler(uri); |
- var typesInferrer = compiler.typesTask.typesInferrer; |
- |
- checkFieldTypeInClass(String className, String fieldName, type) { |
- var cls = findElement(compiler, className); |
- var element = cls.lookupLocalMember(buildSourceString(fieldName)); |
- Expect.equals(type, typesInferrer.getTypeOfElement(element)); |
- } |
- |
- checkFieldTypeInClass('A', 'intField', compiler.typesTask.intType); |
- checkFieldTypeInClass('A', 'stringField', compiler.typesTask.stringType); |
+ asyncTest(() => compiler.runCompiler(uri).then((_) { |
+ var typesInferrer = compiler.typesTask.typesInferrer; |
+ |
+ checkFieldTypeInClass(String className, String fieldName, type) { |
+ var cls = findElement(compiler, className); |
+ var element = cls.lookupLocalMember(buildSourceString(fieldName)); |
+ Expect.equals(type, typesInferrer.getTypeOfElement(element)); |
+ } |
+ |
+ checkFieldTypeInClass('A', 'intField', compiler.typesTask.intType); |
+ checkFieldTypeInClass('A', 'stringField', compiler.typesTask.stringType); |
+ })); |
} |