Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 import 'test_helper.dart'; | |
|
Kevin Millikin (Google)
2017/02/08 15:37:51
Even tests should have a license header.
jensj
2017/02/13 14:04:16
Done.
| |
| 2 import 'service_test_common.dart'; | |
| 3 | |
| 4 const int LINE_A = 8; | |
| 5 const String file = "next_through_assign_call_test.dart"; | |
| 6 | |
| 7 code() { | |
| 8 int a; | |
| 9 int b; | |
| 10 a = b = foo(); | |
| 11 print(a); | |
| 12 print(b); | |
| 13 a = foo(); | |
| 14 print(a); | |
| 15 int d = foo(); | |
| 16 print(d); | |
| 17 int e = foo(), f, g = foo(); | |
| 18 print(e); | |
| 19 print(f); | |
| 20 print(g); | |
| 21 } | |
| 22 | |
| 23 foo() { | |
| 24 return 42; | |
| 25 } | |
| 26 | |
| 27 List<String> stops = []; | |
| 28 List<String> expected = [ | |
| 29 "$file:${LINE_A+0}:7", | |
| 30 "$file:${LINE_A+1}:7", | |
| 31 "$file:${LINE_A+2}:11", | |
| 32 "$file:${LINE_A+3}:3", | |
| 33 "$file:${LINE_A+4}:3", | |
| 34 "$file:${LINE_A+5}:7", | |
| 35 "$file:${LINE_A+6}:3", | |
| 36 "$file:${LINE_A+7}:11", | |
| 37 "$file:${LINE_A+8}:3", | |
| 38 "$file:${LINE_A+9}:11", | |
| 39 "$file:${LINE_A+9}:18", | |
| 40 "$file:${LINE_A+9}:25", | |
| 41 "$file:${LINE_A+10}:3", | |
| 42 "$file:${LINE_A+11}:3", | |
| 43 "$file:${LINE_A+12}:3", | |
| 44 "$file:${LINE_A+13}:1" | |
| 45 ]; | |
| 46 | |
| 47 var tests = [ | |
| 48 hasPausedAtStart, | |
| 49 setBreakpointAtLine(LINE_A), | |
| 50 runStepThroughProgramRecordingStops(stops), | |
| 51 checkRecordedStops(stops, expected) | |
| 52 ]; | |
| 53 | |
| 54 main(args) { | |
| 55 runIsolateTestsSynchronous(args, tests, | |
| 56 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); | |
| 57 } | |
| OLD | NEW |