| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --verbos
e_debug |
| 5 |
| 6 import 'package:observatory/service_io.dart'; |
| 7 import 'package:unittest/unittest.dart'; |
| 8 import 'test_helper.dart'; |
| 9 import 'dart:developer'; |
| 10 |
| 11 foo() async { } |
| 12 |
| 13 doAsync(stop) async { |
| 14 if (stop) debugger(); |
| 15 await foo(); // Line 15. |
| 16 await foo(); // Line 16. |
| 17 await foo(); // Line 17. |
| 18 return null; |
| 19 } |
| 20 |
| 21 testMain() { |
| 22 // With two runs of doAsync floating around, async step should only cause |
| 23 // us to stop in the run we started in. |
| 24 doAsync(false); |
| 25 doAsync(true); |
| 26 } |
| 27 |
| 28 asyncNext(Isolate isolate) async { |
| 29 return isolate.asyncStepOver()[1]; |
| 30 } |
| 31 |
| 32 var tests = [ |
| 33 hasStoppedAtBreakpoint, |
| 34 stoppedAtLine(15), |
| 35 asyncNext, |
| 36 hasStoppedAtBreakpoint, |
| 37 stoppedAtLine(16), |
| 38 asyncNext, |
| 39 hasStoppedAtBreakpoint, |
| 40 stoppedAtLine(17), |
| 41 resumeIsolate, |
| 42 ]; |
| 43 |
| 44 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |