| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/thread.h" | 8 #include "vm/thread.h" |
| 9 #include "vm/unit_test.h" | 9 #include "vm/unit_test.h" |
| 10 | 10 |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 PrintStackTrace(trace); | 641 PrintStackTrace(trace); |
| 642 VerifyStackTrace(trace, expected_trace, expected_locals, 2); | 642 VerifyStackTrace(trace, expected_trace, expected_locals, 2); |
| 643 } | 643 } |
| 644 | 644 |
| 645 | 645 |
| 646 TEST_CASE(Debug_ExprClosureBreakpoint) { | 646 TEST_CASE(Debug_ExprClosureBreakpoint) { |
| 647 const char* kScriptChars = | 647 const char* kScriptChars = |
| 648 "var c; \n" | 648 "var c; \n" |
| 649 " \n" | 649 " \n" |
| 650 "main() { \n" | 650 "main() { \n" |
| 651 " c = add(a, b) { \n" | 651 " c = (a, b) { \n" |
| 652 " return a + b; \n" | 652 " return a + b; \n" |
| 653 " }; \n" | 653 " }; \n" |
| 654 " return c(10, 20); \n" | 654 " return c(10, 20); \n" |
| 655 "} \n"; | 655 "} \n"; |
| 656 | 656 |
| 657 LoadScript(kScriptChars); | 657 LoadScript(kScriptChars); |
| 658 Dart_SetBreakpointHandler(&ExprClosureBreakpointHandler); | 658 Dart_SetBreakpointHandler(&ExprClosureBreakpointHandler); |
| 659 | 659 |
| 660 Dart_Handle script_url = NewString(TestCase::url()); | 660 Dart_Handle script_url = NewString(TestCase::url()); |
| 661 intptr_t line_no = 5; // In closure 'add'. | 661 intptr_t line_no = 5; // In closure 'add'. |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 while (interrupt_isolate_id != ILLEGAL_ISOLATE_ID) { | 1220 while (interrupt_isolate_id != ILLEGAL_ISOLATE_ID) { |
| 1221 ml.Wait(); | 1221 ml.Wait(); |
| 1222 } | 1222 } |
| 1223 } | 1223 } |
| 1224 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); | 1224 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1227 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1228 | 1228 |
| 1229 } // namespace dart | 1229 } // namespace dart |
| OLD | NEW |