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

Side by Side Diff: tests/standalone/debugger/local_variables_test.dart

Issue 933253003: VM: Fix issue with local variable values reported by the debugger. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « tests/standalone/debugger/debug_lib.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, 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 // This test forks a second vm process that runs this dart script as
6 // a debug target.
7 // Run this test with option --wire to see the json messages sent
8 // between the processes.
9 // Run this test with option --verbose to see the stdout and stderr output
10 // of the debug target process.
11
12 import "debug_lib.dart";
13
14 foo() {
15 var y; // Breakpoint
16 return 123;
17 }
18
19 test() {
20 if (true) {
21 var temp = 777;
22 }
23 if (true) {
24 var a = foo(); // Breakpoint
25 if (true) {
26 var s = 456;
27 print(s);
28 }
29 }
30 }
31
32 main(List<String> arguments) {
33 if (RunScript(testScript, arguments)) return;
34 print("Hello from debuggee");
35 test();
36 print("Hello again");
37 }
38
39
40 // Expected debugger events and commands.
41 var testScript = [
42 MatchFrame(0, "main"), // Top frame in trace is function "main".
43 Step(),
44 MatchFrame(0, "main"), // Should still be in "main".
45 SetBreakpoint(15), // Set breakpoint in function foo.
46 SetBreakpoint(24), // Set breakpoint in function test.
47 Resume(),
48 MatchFrames(["test", "main"]),
49 AssertLocalsNotVisible(["a"]), // Here, a is not in scope yet.
50 Resume(),
51 MatchFrames(["foo", "test", "main"]),
52 AssertLocalsNotVisible(["a"], 1), // In the caller, a is not in scope.
53 Step(),
54 MatchLocals({"y": "null"}), // Expect y initialized to null.
55 Resume(),
56 ];
OLDNEW
« no previous file with comments | « tests/standalone/debugger/debug_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698