Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 import 'test_helper.dart'; | |
|
Kevin Millikin (Google)
2017/02/08 15:37:52
License header.
jensj
2017/02/13 14:04:16
Done.
| |
| 2 import 'service_test_common.dart'; | |
| 3 import 'dart:io'; | |
| 4 | |
| 5 const int LINE_A = 9; | |
| 6 const String file = "next_through_simple_async_test.dart"; | |
| 7 | |
| 8 // line A is at the "code() async" line | |
| 9 code() async { | |
| 10 File f = new File(Platform.script.path); | |
| 11 DateTime modified = await f.lastModified(); | |
| 12 bool exists = await f.exists(); | |
| 13 print("Modified: $modified; exists: $exists"); | |
| 14 foo(); | |
| 15 } | |
| 16 | |
| 17 foo() { | |
| 18 print("Hello from Foo!"); | |
| 19 } | |
| 20 | |
| 21 List<String> stops = []; | |
| 22 List<String> expected = [ | |
| 23 "$file:${LINE_A+0}:5", | |
| 24 "$file:${LINE_A+1}:30", | |
| 25 "$file:${LINE_A+1}:37", | |
| 26 "$file:${LINE_A+1}:16", | |
| 27 "$file:${LINE_A+2}:31", | |
| 28 "$file:${LINE_A+2}:23", | |
| 29 "$file:${LINE_A+3}:25", | |
| 30 "$file:${LINE_A+3}:17", | |
| 31 "$file:${LINE_A+4}:47", | |
| 32 "$file:${LINE_A+4}:3", | |
| 33 "$file:${LINE_A+5}:3", | |
| 34 "$file:${LINE_A+6}:1" | |
| 35 ]; | |
| 36 | |
| 37 var tests = [ | |
| 38 hasPausedAtStart, | |
| 39 setBreakpointAtLine(LINE_A), | |
| 40 runStepThroughProgramRecordingStops(stops), | |
| 41 checkRecordedStops(stops, expected) | |
| 42 ]; | |
| 43 | |
| 44 main(args) { | |
| 45 runIsolateTestsSynchronous(args, tests, | |
| 46 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); | |
| 47 } | |
| OLD | NEW |