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/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 Loading... |
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\":12}}," | 48 "\"script\":\"dart:test-lib\",\"tokenPos\":12}}," |
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\":6}}]", | 52 "\"script\":\"dart:test-lib\",\"tokenPos\":6}}]", |
53 js.ToCString()); | 53 js.ToCString()); |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
57 } // namespace dart | 57 } // namespace dart |
OLD | NEW |