| Index: runtime/observatory/tests/service/async_next_test.dart
|
| diff --git a/runtime/observatory/tests/service/async_next_test.dart b/runtime/observatory/tests/service/async_next_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1fc0cc195312e38d6e1c167b3df52473bd0cce5d
|
| --- /dev/null
|
| +++ b/runtime/observatory/tests/service/async_next_test.dart
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| +// 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=--compile_all --error_on_bad_type --error_on_bad_override --verbose_debug
|
| +
|
| +import 'package:observatory/service_io.dart';
|
| +import 'package:unittest/unittest.dart';
|
| +import 'test_helper.dart';
|
| +import 'dart:developer';
|
| +
|
| +foo() async { }
|
| +
|
| +doAsync(stop) async {
|
| + if (stop) debugger();
|
| + await foo(); // Line 15.
|
| + await foo(); // Line 16.
|
| + await foo(); // Line 17.
|
| + return null;
|
| +}
|
| +
|
| +testMain() {
|
| + // With two runs of doAsync floating around, async step should only cause
|
| + // us to stop in the run we started in.
|
| + doAsync(false);
|
| + doAsync(true);
|
| +}
|
| +
|
| +asyncNext(Isolate isolate) async {
|
| + return isolate.asyncStepOver()[Isolate.kSecondResume];
|
| +}
|
| +
|
| +var tests = [
|
| + hasStoppedAtBreakpoint,
|
| + stoppedAtLine(15),
|
| + asyncNext,
|
| + hasStoppedAtBreakpoint,
|
| + stoppedAtLine(16),
|
| + asyncNext,
|
| + hasStoppedAtBreakpoint,
|
| + stoppedAtLine(17),
|
| + resumeIsolate,
|
| +];
|
| +
|
| +main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
|
|
|