| 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();
|
| + });
|
| + }
|
| }
|
|
|