| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'test_helper.dart'; |
| 6 import 'service_test_common.dart'; |
| 7 |
| 8 const int LINE_A = 15; |
| 9 const String file = "next_through_simple_linear_2_test.dart"; |
| 10 |
| 11 code() { |
| 12 var a = getA(); |
| 13 var b = getB(); |
| 14 |
| 15 print("Hello, World!"); // LINE_A |
| 16 print("a: $a; b: $b"); |
| 17 print("Goodbye, world!"); |
| 18 } |
| 19 |
| 20 getA() => true; |
| 21 getB() => 42; |
| 22 |
| 23 List<String> stops = []; |
| 24 List<String> expected = [ |
| 25 "$file:$LINE_A:3", // on call to 'print' |
| 26 "$file:${LINE_A+1}:23", // on ')', i.e. before ';' |
| 27 "$file:${LINE_A+1}:3", // on call to 'print' |
| 28 "$file:${LINE_A+2}:3", // on call to 'print' |
| 29 "$file:${LINE_A+3}:1" // on ending '}' |
| 30 ]; |
| 31 |
| 32 var tests = [ |
| 33 hasPausedAtStart, |
| 34 setBreakpointAtLine(LINE_A), |
| 35 runStepThroughProgramRecordingStops(stops), |
| 36 checkRecordedStops(stops, expected) |
| 37 ]; |
| 38 |
| 39 main(args) { |
| 40 runIsolateTestsSynchronous(args, tests, |
| 41 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); |
| 42 } |
| OLD | NEW |