OLD | NEW |
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/dart_api_impl.h" | 5 #include "vm/dart_api_impl.h" |
6 #include "vm/debugger.h" | 6 #include "vm/debugger.h" |
7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 debugger->SetBreakpointAtLine(url, 3); | 63 debugger->SetBreakpointAtLine(url, 3); |
64 { | 64 { |
65 JSONStream js; | 65 JSONStream js; |
66 { | 66 { |
67 JSONArray jsarr(&js); | 67 JSONArray jsarr(&js); |
68 debugger->PrintBreakpointsToJSONArray(&jsarr); | 68 debugger->PrintBreakpointsToJSONArray(&jsarr); |
69 } | 69 } |
70 ExpectSubstringF( | 70 ExpectSubstringF( |
71 js.ToCString(), | 71 js.ToCString(), |
72 "[{\"type\":\"Breakpoint\",\"id\":\"breakpoints\\/2\"," | 72 "[{\"type\":\"Breakpoint\",\"id\":\"breakpoints\\/2\"," |
73 "\"breakpointNumber\":2,\"enabled\":true,\"resolved\":false," | 73 "\"breakpointNumber\":2,\"resolved\":false," |
74 "\"location\":{\"type\":\"Location\"," | 74 "\"location\":{\"type\":\"Location\"," |
75 "\"script\":{\"type\":\"@Script\"," | 75 "\"script\":{\"type\":\"@Script\"," |
76 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\"," | 76 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\"," |
77 "\"name\":\"test-lib\"," | 77 "\"name\":\"test-lib\"," |
78 "\"kind\":\"script\"},\"tokenPos\":14}}," | 78 "\"kind\":\"script\"},\"tokenPos\":14}}," |
79 "{\"type\":\"Breakpoint\",\"id\":\"breakpoints\\/1\"," | 79 "{\"type\":\"Breakpoint\",\"id\":\"breakpoints\\/1\"," |
80 "\"breakpointNumber\":1,\"enabled\":true,\"resolved\":false," | 80 "\"breakpointNumber\":1,\"resolved\":false," |
81 "\"location\":{\"type\":\"Location\"," | 81 "\"location\":{\"type\":\"Location\"," |
82 "\"script\":{\"type\":\"@Script\"," | 82 "\"script\":{\"type\":\"@Script\"," |
83 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\"," | 83 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\"," |
84 "\"name\":\"test-lib\"," | 84 "\"name\":\"test-lib\"," |
85 "\"kind\":\"script\"},\"tokenPos\":5}}]", | 85 "\"kind\":\"script\"},\"tokenPos\":5}}]", |
86 vmlib.index(), vmlib.index()); | 86 vmlib.index(), vmlib.index()); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 | 90 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 debugger->SetBreakpointAtLine(url, 2); | 131 debugger->SetBreakpointAtLine(url, 2); |
132 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); | 132 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); |
133 EXPECT_VALID(result); | 133 EXPECT_VALID(result); |
134 EXPECT(Dart_IsString(result)); | 134 EXPECT(Dart_IsString(result)); |
135 | 135 |
136 // We ran the code in InspectPausedEvent. | 136 // We ran the code in InspectPausedEvent. |
137 EXPECT(saw_paused_event); | 137 EXPECT(saw_paused_event); |
138 } | 138 } |
139 | 139 |
140 } // namespace dart | 140 } // namespace dart |
OLD | NEW |