Chromium Code Reviews| 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 = 14; | |
| 9 const String file = "next_through_closure_test.dart"; | |
| 10 | |
| 11 codeXYZ(int i) { | |
| 12 var x = () => | |
| 13 // some comment here to allow this formatting | |
| 14 i * i; // LINE_A | |
| 15 return x(); | |
| 16 } | |
| 17 | |
| 18 code() { | |
| 19 codeXYZ(42); | |
| 20 } | |
| 21 | |
| 22 List<String> stops = []; | |
| 23 List<String> expected = [ | |
| 24 "$file:${LINE_A+0}:9", | |
|
hausner
2017/02/14 13:16:04
Add comments to explain which token you expect at
jensj
2017/02/14 13:23:54
I will add that.
| |
| 25 "$file:${LINE_A+0}:7", | |
| 26 "$file:${LINE_A+1}:3", | |
| 27 "$file:${LINE_A+6}:1" | |
| 28 ]; | |
| 29 | |
| 30 var tests = [ | |
| 31 hasPausedAtStart, | |
| 32 setBreakpointAtLine(LINE_A), | |
| 33 runStepThroughProgramRecordingStops(stops), | |
| 34 checkRecordedStops(stops, expected) | |
| 35 ]; | |
| 36 | |
| 37 main(args) { | |
| 38 runIsolateTestsSynchronous(args, tests, | |
| 39 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); | |
| 40 } | |
| OLD | NEW |