Index: tests/compiler/dart2js/static_closure_test.dart |
diff --git a/tests/compiler/dart2js/static_closure_test.dart b/tests/compiler/dart2js/static_closure_test.dart |
index 4003c61f2a73a0ed95a7c078fede24179960294b..3c067aa82b47d0c1e78c5b6df3bc0033405650c9 100644 |
--- a/tests/compiler/dart2js/static_closure_test.dart |
+++ b/tests/compiler/dart2js/static_closure_test.dart |
@@ -5,17 +5,19 @@ |
// Test that static functions are closurized as expected. |
import "package:expect/expect.dart"; |
+import "../../async_helper.dart"; |
import 'compiler_helper.dart'; |
main() { |
- String code = compileAll(r'''main() { print(main); }'''); |
+ asyncTest(() => compileAll(r'''main() { print(main); }''').then((code) { |
+ // At some point, we will have to closurize global functions |
+ // differently, at which point this test will break. Then it is time |
+ // to implement a way to call a Dart closure from JS foreign |
+ // functions. |
- // At some point, we will have to closurize global functions |
- // differently, at which point this test will break. Then it is time |
- // to implement a way to call a Dart closure from JS foreign |
- // functions. |
- |
- // If this test fail, please take a look at the use of |
- // toStringWrapper in captureStackTrace in js_helper.dart. |
- Expect.isTrue(code.contains(new RegExp(r'print\([$a-z]+\.main\$closure\);'))); |
+ // If this test fail, please take a look at the use of |
+ // toStringWrapper in captureStackTrace in js_helper.dart. |
+ Expect.isTrue(code.contains( |
+ new RegExp(r'print\([$a-z]+\.main\$closure\);'))); |
+ })); |
} |