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

Unified Diff: runtime/vm/debugger_test.cc

Issue 2912763005: Hit breakpoints in single line closures. (Closed)
Patch Set: Enable a test with dartk which now passes Created 3 years, 7 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/debugger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_test.cc
diff --git a/runtime/vm/debugger_test.cc b/runtime/vm/debugger_test.cc
index f9376e1f8af6d0dfc5fbaa09631b6d338d596f3e..70fc140c1b292951227c9fc1606c5adcb0ad5b83 100644
--- a/runtime/vm/debugger_test.cc
+++ b/runtime/vm/debugger_test.cc
@@ -130,6 +130,13 @@ TEST_CASE(Debugger_SetBreakpointInFunctionLiteralFieldInitializers) {
EXPECT(Dart_IsInteger(result));
EXPECT_VALID(Dart_IntegerToInt64(result, &closure_bp_id[3]));
+ // Cannot set breakpoint at the start of the class definition.
+ // The implicit constructor token position matches that of the
+ // class definition's token position. So, we do not want to
+ // allow setting breakpoints in implicit consturctors.
+ result = Dart_SetBreakpoint(url, 8);
+ EXPECT_ERROR(result, "could not set breakpoint at line 8");
+
result = Dart_SetBreakpoint(url, 20);
EXPECT_ERROR(result, "could not set breakpoint at line 20");
@@ -141,10 +148,7 @@ TEST_CASE(Debugger_SetBreakpointInFunctionLiteralFieldInitializers) {
Dart_SetPausedEventHandler(PausedInClosuresHandler);
result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
- // TODO(sivachandra): Understand why a breakpoint on a single line
- // functional literal is not being hit. When that issue is resolved,
- // adjust this test to check hitting the breakpoint at line 19 also.
- EXPECT(closure_hit_count == 3);
+ EXPECT(closure_hit_count == 4);
}
TEST_CASE(Debugger_RemoveBreakpoint) {
« no previous file with comments | « runtime/vm/debugger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698