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 |
| 11 #ifndef PRODUCT |
| 12 |
11 // Search for the formatted string in buffer. | 13 // Search for the formatted string in buffer. |
12 // | 14 // |
13 // TODO(turnidge): This function obscures the line number of failing | 15 // TODO(turnidge): This function obscures the line number of failing |
14 // EXPECTs. Rework this. | 16 // EXPECTs. Rework this. |
15 static void ExpectSubstringF(const char* buff, const char* fmt, ...) { | 17 static void ExpectSubstringF(const char* buff, const char* fmt, ...) { |
16 va_list args; | 18 va_list args; |
17 va_start(args, fmt); | 19 va_start(args, fmt); |
18 intptr_t len = OS::VSNPrint(NULL, 0, fmt, args); | 20 intptr_t len = OS::VSNPrint(NULL, 0, fmt, args); |
19 va_end(args); | 21 va_end(args); |
20 | 22 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // Set a breakpoint and run. | 130 // Set a breakpoint and run. |
129 debugger->SetBreakpointAtLine(url, 2); | 131 debugger->SetBreakpointAtLine(url, 2); |
130 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); | 132 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); |
131 EXPECT_VALID(result); | 133 EXPECT_VALID(result); |
132 EXPECT(Dart_IsString(result)); | 134 EXPECT(Dart_IsString(result)); |
133 | 135 |
134 // We ran the code in InspectPausedEvent. | 136 // We ran the code in InspectPausedEvent. |
135 EXPECT(saw_paused_event); | 137 EXPECT(saw_paused_event); |
136 } | 138 } |
137 | 139 |
| 140 #endif // !PRODUCT |
| 141 |
138 } // namespace dart | 142 } // namespace dart |
OLD | NEW |