Index: tests/utils/recursive_import_test.dart |
diff --git a/tests/utils/recursive_import_test.dart b/tests/utils/recursive_import_test.dart |
index 7820774372e960b908c9d5b90e7d16fa4c895c24..266514358bcb181dd973665a93205b03a548a1c3 100644 |
--- a/tests/utils/recursive_import_test.dart |
+++ b/tests/utils/recursive_import_test.dart |
@@ -81,14 +81,19 @@ main() { |
} |
} |
- String code = compile(new Uri.fromComponents(scheme: 'main'), |
- new Uri.fromComponents(scheme: 'lib', path: '/'), |
- new Uri.fromComponents(scheme: 'package', path: '/'), |
- provider, handler).value; |
- Expect.isNull(code); |
- Expect.isTrue(10 < count); |
- // Two warnings for each time RECURSIVE_MAIN is read, except the |
- // first time. |
- Expect.equals(2 * (count - 1), warningCount); |
- Expect.equals(1, errorCount); |
+ Future<String> result = |
+ compile(new Uri.fromComponents(scheme: 'main'), |
+ new Uri.fromComponents(scheme: 'lib', path: '/'), |
+ new Uri.fromComponents(scheme: 'package', path: '/'), |
+ provider, handler); |
+ result.then((String code) { |
+ Expect.isNull(code); |
+ Expect.isTrue(10 < count); |
+ // Two warnings for each time RECURSIVE_MAIN is read, except the |
+ // first time. |
+ Expect.equals(2 * (count - 1), warningCount); |
+ Expect.equals(1, errorCount); |
+ }, onError: (AsyncError e) { |
+ throw 'Compilation failed'; |
+ }); |
} |