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

Unified Diff: tests/lib_2/async/schedule_microtask2_test.dart

Issue 3001793002: Migrated test block 171 to Dart 2.0. (Closed)
Patch Set: Addressed Bob's comment Created 3 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 | « tests/lib_2/async/run_zoned9_test.dart ('k') | tests/lib_2/async/schedule_microtask3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_2/async/schedule_microtask2_test.dart
diff --git a/tests/lib_strong/async/stack_trace02_test.dart b/tests/lib_2/async/schedule_microtask2_test.dart
similarity index 59%
rename from tests/lib_strong/async/stack_trace02_test.dart
rename to tests/lib_2/async/schedule_microtask2_test.dart
index 2932a2e4b2d467ad69f8086260c53606c18cbf17..ab72d866127bd7e8a6bc235e4f0c374fa9c8e17b 100644
--- a/tests/lib_strong/async/stack_trace02_test.dart
+++ b/tests/lib_2/async/schedule_microtask2_test.dart
@@ -2,19 +2,20 @@
// 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.
-import 'package:expect/expect.dart';
+library run_async_test;
+
import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
import 'dart:async';
main() {
- StackTrace trace;
- asyncStart();
- var f = new Future(() {
- throw "foo";
- });
- f.catchError((e, st) {
- Expect.equals("foo", e);
- Expect.isNotNull(st);
- asyncEnd();
- });
+ int lastCallback = -1;
+ for (int i = 0; i < 100; i++) {
+ asyncStart();
+ scheduleMicrotask(() {
+ Expect.equals(lastCallback, i - 1);
+ lastCallback = i;
+ asyncEnd();
+ });
+ }
}
« no previous file with comments | « tests/lib_2/async/run_zoned9_test.dart ('k') | tests/lib_2/async/schedule_microtask3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698