| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug | 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug |
| 5 | 5 |
| 6 import 'package:observatory/service_io.dart'; | |
| 7 import 'test_helper.dart'; | 6 import 'test_helper.dart'; |
| 8 import 'dart:developer'; | 7 import 'dart:developer'; |
| 9 | 8 |
| 10 // :async_op will not be captured in this function because it never needs to | 9 // :async_op will not be captured in this function because it never needs to |
| 11 // reschedule it. | 10 // reschedule it. |
| 12 asyncWithoutAwait() async { | 11 asyncWithoutAwait() async { |
| 13 print("asyncWithoutAwait"); | 12 print("asyncWithoutAwait"); |
| 14 } | 13 } |
| 15 | 14 |
| 16 testMain() { | 15 testMain() { |
| 17 debugger(); | 16 debugger(); |
| 18 asyncWithoutAwait(); | 17 asyncWithoutAwait(); // Line 17 |
| 19 } | 18 } |
| 20 | 19 |
| 21 var tests = [ | 20 var tests = [ |
| 22 hasStoppedAtBreakpoint, | 21 hasStoppedAtBreakpoint, |
| 23 stoppedAtLine(18), | 22 stoppedAtLine(17), |
| 24 (isolate) => isolate.stepInto(), | 23 (isolate) => isolate.stepInto(), |
| 25 hasStoppedAtBreakpoint, | 24 hasStoppedAtBreakpoint, |
| 26 (isolate) => isolate.getStack(), // Should not crash. | 25 (isolate) => isolate.getStack(), // Should not crash. |
| 27 // TODO(rmacnak): stoppedAtLine(12) | 26 // TODO(rmacnak): stoppedAtLine(12) |
| 28 // This doesn't happen because asyncWithoutAwait is marked undebuggable. | 27 // This doesn't happen because asyncWithoutAwait is marked undebuggable. |
| 29 // Probably needs to change to support async-step-into. | 28 // Probably needs to change to support async-step-into. |
| 30 resumeIsolate, | 29 resumeIsolate, |
| 31 ]; | 30 ]; |
| 32 | 31 |
| 33 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 32 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |