| 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'; | 6 import 'package:observatory/service_io.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 import 'service_test_common.dart'; |
| 8 import 'test_helper.dart'; | 9 import 'test_helper.dart'; |
| 9 import 'dart:developer'; | 10 import 'dart:developer'; |
| 10 | 11 |
| 11 testFunction(flag) { // Line 11 | 12 const int LINE_A = 14; |
| 13 |
| 14 testFunction(flag) { // Line A. |
| 12 if (flag) { | 15 if (flag) { |
| 13 print("Yes"); | 16 print("Yes"); |
| 14 } else { | 17 } else { |
| 15 print("No"); | 18 print("No"); |
| 16 } | 19 } |
| 17 } | 20 } |
| 18 | 21 |
| 19 testMain() { | 22 testMain() { |
| 20 debugger(); | 23 debugger(); |
| 21 testFunction(true); | 24 testFunction(true); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 var function = rootLib.functions.singleWhere((f) => f.name == 'testFunction'); | 36 var function = rootLib.functions.singleWhere((f) => f.name == 'testFunction'); |
| 34 | 37 |
| 35 var bpt = await isolate.addBreakpointAtEntry(function); | 38 var bpt = await isolate.addBreakpointAtEntry(function); |
| 36 expect(bpt is Breakpoint, isTrue); | 39 expect(bpt is Breakpoint, isTrue); |
| 37 print(bpt); | 40 print(bpt); |
| 38 }, | 41 }, |
| 39 | 42 |
| 40 resumeIsolate, | 43 resumeIsolate, |
| 41 | 44 |
| 42 hasStoppedAtBreakpoint, | 45 hasStoppedAtBreakpoint, |
| 43 stoppedAtLine(11), | 46 stoppedAtLine(LINE_A), |
| 44 resumeIsolate, | 47 resumeIsolate, |
| 45 | 48 |
| 46 hasStoppedAtBreakpoint, | 49 hasStoppedAtBreakpoint, |
| 47 stoppedAtLine(11), | 50 stoppedAtLine(LINE_A), |
| 48 resumeIsolate, | 51 resumeIsolate, |
| 49 | 52 |
| 50 ]; | 53 ]; |
| 51 | 54 |
| 52 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 55 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |