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

Side by Side Diff: runtime/vm/debugger_test.cc

Issue 117133005: Change how debugger handles source breakpoints (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 12 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 | « runtime/vm/debugger.cc ('k') | runtime/vm/json_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 #include "vm/unit_test.h" 6 #include "vm/unit_test.h"
7 7
8 namespace dart { 8 namespace dart {
9 9
10 TEST_CASE(Debugger_PrintBreakpointsToJSONArray) { 10 TEST_CASE(Debugger_PrintBreakpointsToJSONArray) {
(...skipping 26 matching lines...) Expand all
37 debugger->SetBreakpointAtLine(url, 3); 37 debugger->SetBreakpointAtLine(url, 3);
38 { 38 {
39 JSONStream js; 39 JSONStream js;
40 { 40 {
41 JSONArray jsarr(&js); 41 JSONArray jsarr(&js);
42 debugger->PrintBreakpointsToJSONArray(&jsarr); 42 debugger->PrintBreakpointsToJSONArray(&jsarr);
43 } 43 }
44 EXPECT_STREQ( 44 EXPECT_STREQ(
45 "[{\"type\":\"Breakpoint\",\"id\":2," 45 "[{\"type\":\"Breakpoint\",\"id\":2,"
46 "\"enabled\":true,\"resolved\":false," 46 "\"enabled\":true,\"resolved\":false,"
47 "\"location\":{\"type\":\"Location\",\"libId\":12," 47 "\"location\":{\"type\":\"Location\","
48 "\"script\":\"dart:test-lib\",\"tokenPos\":14}}," 48 "\"script\":\"dart:test-lib\",\"tokenPos\":14}},"
49 "{\"type\":\"Breakpoint\",\"id\":1," 49 "{\"type\":\"Breakpoint\",\"id\":1,"
50 "\"enabled\":true,\"resolved\":false," 50 "\"enabled\":true,\"resolved\":false,"
51 "\"location\":{\"type\":\"Location\",\"libId\":12," 51 "\"location\":{\"type\":\"Location\","
52 "\"script\":\"dart:test-lib\",\"tokenPos\":5}}]", 52 "\"script\":\"dart:test-lib\",\"tokenPos\":5}}]",
53 js.ToCString()); 53 js.ToCString());
54 } 54 }
55 } 55 }
56 56
57 57
58 static bool saw_paused_event = false; 58 static bool saw_paused_event = false;
59 59
60 static void InspectPausedEvent(Dart_IsolateId isolate_id, 60 static void InspectPausedEvent(Dart_IsolateId isolate_id,
61 intptr_t bp_id, 61 intptr_t bp_id,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 EXPECT_VALID(result); 100 EXPECT_VALID(result);
101 EXPECT(Dart_IsString(result)); 101 EXPECT(Dart_IsString(result));
102 102
103 // We ran the code in InspectPausedEvent. 103 // We ran the code in InspectPausedEvent.
104 EXPECT(saw_paused_event); 104 EXPECT(saw_paused_event);
105 } 105 }
106 106
107 107
108 108
109 } // namespace dart 109 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/json_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698