Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: tests/language/async_control_structures_test.dart

Issue 467323002: Fix call to completer for async closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added iterations to test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/async_control_structures_test.dart
diff --git a/tests/language/async_control_structures_test.dart b/tests/language/async_control_structures_test.dart
index beb875a5b6c330e068368159dbc4c1377ba4c47b..aca024a09d2e5185916c2ef1ce6eaf62e0967c63 100644
--- a/tests/language/async_control_structures_test.dart
+++ b/tests/language/async_control_structures_test.dart
@@ -2,7 +2,7 @@
// 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
+// VMOptions=--enable_async --optimization-counter-threshold=10
import 'package:expect/expect.dart';
@@ -69,27 +69,29 @@ asyncImplicitReturn() async {
main() {
var asyncReturn;
- asyncReturn = asyncIf(true);
- expectThenValue(asyncReturn, 1);
- asyncReturn = asyncIf(false);
- expectThenValue(asyncReturn, 2);
+ for (int i = 0; i < 10; i++) {
+ asyncReturn = asyncIf(true);
+ expectThenValue(asyncReturn, 1);
+ asyncReturn = asyncIf(false);
+ expectThenValue(asyncReturn, 2);
- asyncReturn = asyncFor(true);
- expectThenValue(asyncReturn, 1);
- asyncReturn = asyncFor(false);
- expectThenValue(asyncReturn, 2);
+ asyncReturn = asyncFor(true);
+ expectThenValue(asyncReturn, 1);
+ asyncReturn = asyncFor(false);
+ expectThenValue(asyncReturn, 2);
- asyncReturn = asyncTryCatchFinally(true, false);
- expectThenValue(asyncReturn, 3);
- asyncReturn = asyncTryCatchFinally(false, false);
- expectThenValue(asyncReturn, 1);
- asyncReturn = asyncTryCatchFinally(true, true);
- expectThenValue(asyncReturn, 3);
- asyncReturn = asyncTryCatchFinally(false, true);
- expectThenValue(asyncReturn, 444);
- asyncReturn = asyncTryCatchLoop();
- expectThenValue(asyncReturn, 13);
+ asyncReturn = asyncTryCatchFinally(true, false);
+ expectThenValue(asyncReturn, 3);
+ asyncReturn = asyncTryCatchFinally(false, false);
+ expectThenValue(asyncReturn, 1);
+ asyncReturn = asyncTryCatchFinally(true, true);
+ expectThenValue(asyncReturn, 3);
+ asyncReturn = asyncTryCatchFinally(false, true);
+ expectThenValue(asyncReturn, 444);
+ asyncReturn = asyncTryCatchLoop();
+ expectThenValue(asyncReturn, 13);
- asyncReturn = asyncImplicitReturn();
- expectThenValue(asyncReturn, null);
+ asyncReturn = asyncImplicitReturn();
+ expectThenValue(asyncReturn, null);
+ }
}
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698