Index: tests/language/await_future_test.dart |
diff --git a/tests/language/async_backwards_compatibility_1_test.dart b/tests/language/await_future_test.dart |
similarity index 53% |
copy from tests/language/async_backwards_compatibility_1_test.dart |
copy to tests/language/await_future_test.dart |
index 93908797af9400f0cdc751626158e1f4e39f6af5..496d84858728d3ba72cd7663ef803b4efa4119aa 100644 |
--- a/tests/language/async_backwards_compatibility_1_test.dart |
+++ b/tests/language/await_future_test.dart |
@@ -2,17 +2,22 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+// VMOptions=--enable_async |
srdjan
2014/08/20 17:50:06
"--optimization-counter-threshold=5" as well?
Michael Lippautz (Google)
2014/08/20 20:56:07
Done.
|
+ |
import 'dart:async'; |
-import 'async_helper_lib.dart' as async; |
-class A { |
- async.async get async => null; |
-} |
+bar(p) => new Future(() => p); |
-async.async topLevel() => null; |
+foo() async { |
+ var b; |
+ for(int i = 0; i < 10; i++) { |
+ b += (await bar(1)) + (await bar(2)); |
+ } |
+ return b; |
+} |
main() { |
- var a = new A(); |
- var b = a.async; |
- var c = topLevel(); |
+ foo().then((result) { |
+ print(result); |
hausner
2014/08/20 19:47:49
Use Expect.equals to verify that the result is cor
Michael Lippautz (Google)
2014/08/20 20:56:07
Done.
|
+ }); |
} |