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

Unified Diff: tests/standalone/debugger/local_variables_test.dart

Issue 936283005: VM: Fix a bug with local variable values when breaking at a variable declaration. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/debugger/local_variables_test.dart
===================================================================
--- tests/standalone/debugger/local_variables_test.dart (revision 43869)
+++ tests/standalone/debugger/local_variables_test.dart (working copy)
@@ -29,10 +29,25 @@
}
}
+test_no_init() {
+ if (true) {
+ var temp = 777;
+ }
+ if (true) {
+ var a; // Breakpoint
+ if (true) {
+ var s = 456;
+ print(s);
+ }
+ }
+}
+
+
main(List<String> arguments) {
if (RunScript(testScript, arguments)) return;
print("Hello from debuggee");
test();
+ test_no_init();
print("Hello again");
}
@@ -44,6 +59,7 @@
MatchFrame(0, "main"), // Should still be in "main".
SetBreakpoint(15), // Set breakpoint in function foo.
SetBreakpoint(24), // Set breakpoint in function test.
+ SetBreakpoint(37), // Set breakpoint in function test_no_init.
Resume(),
MatchFrames(["test", "main"]),
AssertLocalsNotVisible(["a"]), // Here, a is not in scope yet.
@@ -53,4 +69,9 @@
Step(),
MatchLocals({"y": "null"}), // Expect y initialized to null.
Resume(),
+ MatchFrames(["test_no_init", "main"]),
+ AssertLocalsNotVisible(["a"]), // a is not in scope.
+ Step(),
+ MatchLocals({"a": "null"}),
+ Resume()
];
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698