Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: runtime/observatory/tests/service/next_through_assign_call_test.dart

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 = 12;
9 const String file = "next_through_assign_call_test.dart";
10
11 code() {
12 int a;
13 int b;
14 a = b = foo();
15 print(a);
16 print(b);
17 a = foo();
18 print(a);
19 int d = foo();
20 print(d);
21 int e = foo(), f, g = foo();
22 print(e);
23 print(f);
24 print(g);
25 }
26
27 foo() {
28 return 42;
29 }
30
31 List<String> stops = [];
32 List<String> expected = [
33 "$file:${LINE_A+0}:7", // on variable 'a'
34 "$file:${LINE_A+1}:7", // on variable 'b'
35 "$file:${LINE_A+2}:11", // on call to 'foo'
36 "$file:${LINE_A+3}:3", // on call to 'print'
37 "$file:${LINE_A+4}:3", // on call to 'print'
38 "$file:${LINE_A+5}:7", // on call to 'foo'
39 "$file:${LINE_A+6}:3", // on call to 'print'
40 "$file:${LINE_A+7}:11", // on call to 'foo'
41 "$file:${LINE_A+8}:3", // on call to 'print'
42 "$file:${LINE_A+9}:11", // on first call to 'foo'
43 "$file:${LINE_A+9}:18", // on variable 'f'
44 "$file:${LINE_A+9}:25", // on second call to 'foo'
45 "$file:${LINE_A+10}:3", // on call to 'print'
46 "$file:${LINE_A+11}:3", // on call to 'print'
47 "$file:${LINE_A+12}:3", // on call to 'print'
48 "$file:${LINE_A+13}:1" // on ending '}'
49 ];
50
51 var tests = [
52 hasPausedAtStart,
53 setBreakpointAtLine(LINE_A),
54 runStepThroughProgramRecordingStops(stops),
55 checkRecordedStops(stops, expected)
56 ];
57
58 main(args) {
59 runIsolateTestsSynchronous(args, tests,
60 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698