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 // TODO(zra): Remove when tests are ready to enable. | 5 // TODO(zra): Remove when tests are ready to enable. |
6 #include "platform/globals.h" | 6 #include "platform/globals.h" |
7 #if !defined(TARGET_ARCH_ARM64) | 7 #if !defined(TARGET_ARCH_ARM64) |
8 | 8 |
9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 { | 42 { |
43 JSONStream js; | 43 JSONStream js; |
44 { | 44 { |
45 JSONArray jsarr(&js); | 45 JSONArray jsarr(&js); |
46 debugger->PrintBreakpointsToJSONArray(&jsarr); | 46 debugger->PrintBreakpointsToJSONArray(&jsarr); |
47 } | 47 } |
48 EXPECT_STREQ( | 48 EXPECT_STREQ( |
49 "[{\"type\":\"Breakpoint\",\"id\":2," | 49 "[{\"type\":\"Breakpoint\",\"id\":2," |
50 "\"enabled\":true,\"resolved\":false," | 50 "\"enabled\":true,\"resolved\":false," |
51 "\"location\":{\"type\":\"Location\"," | 51 "\"location\":{\"type\":\"Location\"," |
52 "\"script\":\"dart:test-lib\",\"tokenPos\":14}}," | 52 "\"script\":\"test-lib\",\"tokenPos\":14}}," |
53 "{\"type\":\"Breakpoint\",\"id\":1," | 53 "{\"type\":\"Breakpoint\",\"id\":1," |
54 "\"enabled\":true,\"resolved\":false," | 54 "\"enabled\":true,\"resolved\":false," |
55 "\"location\":{\"type\":\"Location\"," | 55 "\"location\":{\"type\":\"Location\"," |
56 "\"script\":\"dart:test-lib\",\"tokenPos\":5}}]", | 56 "\"script\":\"test-lib\",\"tokenPos\":5}}]", |
57 js.ToCString()); | 57 js.ToCString()); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 | 61 |
62 static bool saw_paused_event = false; | 62 static bool saw_paused_event = false; |
63 | 63 |
64 static void InspectPausedEvent(Dart_IsolateId isolate_id, | 64 static void InspectPausedEvent(Dart_IsolateId isolate_id, |
65 intptr_t bp_id, | 65 intptr_t bp_id, |
66 const Dart_CodeLocation& loc) { | 66 const Dart_CodeLocation& loc) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 EXPECT_VALID(result); | 104 EXPECT_VALID(result); |
105 EXPECT(Dart_IsString(result)); | 105 EXPECT(Dart_IsString(result)); |
106 | 106 |
107 // We ran the code in InspectPausedEvent. | 107 // We ran the code in InspectPausedEvent. |
108 EXPECT(saw_paused_event); | 108 EXPECT(saw_paused_event); |
109 } | 109 } |
110 | 110 |
111 } // namespace dart | 111 } // namespace dart |
112 | 112 |
113 #endif // !defined(TARGET_ARCH_ARM64) | 113 #endif // !defined(TARGET_ARCH_ARM64) |
OLD | NEW |