| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 --asyn
c_debugger | 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug --asyn
c_debugger |
| 5 | 5 |
| 6 import 'dart:developer'; | 6 import 'dart:developer'; |
| 7 import 'package:observatory/models.dart' as M; | 7 |
| 8 import 'package:observatory/service_io.dart'; | |
| 9 import 'package:unittest/unittest.dart'; | |
| 10 import 'service_test_common.dart'; | 8 import 'service_test_common.dart'; |
| 11 import 'test_helper.dart'; | 9 import 'test_helper.dart'; |
| 12 | 10 |
| 13 const LINE_A = 24; | 11 const LINE_A = 22; |
| 14 const LINE_B = 25; | 12 const LINE_B = 23; |
| 15 const LINE_C = 29; | 13 const LINE_C = 27; |
| 16 const LINE_D = 32; | 14 const LINE_D = 30; |
| 17 const LINE_E = 39; | 15 const LINE_E = 37; |
| 18 const LINE_F = 40; | 16 const LINE_F = 38; |
| 19 const LINE_G = 41; | 17 const LINE_G = 39; |
| 20 const LINE_H = 30; | 18 const LINE_H = 28; |
| 21 const LINE_I = 34; | 19 const LINE_I = 32; |
| 22 | 20 |
| 23 foobar() async* { | 21 foobar() async* { |
| 24 yield 1; // LINE_A. | 22 yield 1; // LINE_A. |
| 25 yield 2; // LINE_B. | 23 yield 2; // LINE_B. |
| 26 } | 24 } |
| 27 | 25 |
| 28 helper() async { | 26 helper() async { |
| 29 print('helper'); // LINE_C. | 27 print('helper'); // LINE_C. |
| 30 await for (var i in foobar()) { // LINE_H. | 28 await for (var i in foobar()) /* LINE_H */ { |
| 31 debugger(); | 29 debugger(); |
| 32 print('loop'); // LINE_D. | 30 print('loop'); // LINE_D. |
| 33 } | 31 } |
| 34 return null; // LINE_I. | 32 return null; // LINE_I. |
| 35 } | 33 } |
| 36 | 34 |
| 37 testMain() { | 35 testMain() { |
| 38 debugger(); | 36 debugger(); |
| 39 print('mmmmm'); // LINE_E. | 37 print('mmmmm'); // LINE_E. |
| 40 helper(); // LINE_F. | 38 helper(); // LINE_F. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 stoppedAtLine(LINE_H), // await for. | 79 stoppedAtLine(LINE_H), // await for. |
| 82 stepInto, | 80 stepInto, |
| 83 hasStoppedAtBreakpoint, | 81 hasStoppedAtBreakpoint, |
| 84 stepOut, // step out of generator. | 82 stepOut, // step out of generator. |
| 85 hasStoppedAtBreakpoint, | 83 hasStoppedAtBreakpoint, |
| 86 stoppedAtLine(LINE_I), // return null. | 84 stoppedAtLine(LINE_I), // return null. |
| 87 ]; | 85 ]; |
| 88 | 86 |
| 89 main(args) => | 87 main(args) => |
| 90 runIsolateTestsSynchronous(args, tests, testeeConcurrent: testMain); | 88 runIsolateTestsSynchronous(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |