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 "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/thread.h" | 9 #include "vm/thread.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 Dart_Handle exception_object, | 2033 Dart_Handle exception_object, |
2034 Dart_StackTrace trace) { | 2034 Dart_StackTrace trace) { |
2035 breakpoint_hit_counter++; | 2035 breakpoint_hit_counter++; |
2036 } | 2036 } |
2037 | 2037 |
2038 | 2038 |
2039 // Check that the debugger is not called when an exception is | 2039 // Check that the debugger is not called when an exception is |
2040 // caught by Dart code. | 2040 // caught by Dart code. |
2041 TEST_CASE(Debug_BreakOnUnhandledException) { | 2041 TEST_CASE(Debug_BreakOnUnhandledException) { |
2042 const char* kScriptChars = | 2042 const char* kScriptChars = |
2043 "void main() { \n" | 2043 "main() { \n" |
2044 " try { \n" | 2044 " try { \n" |
2045 " throw 'broccoli'; \n" | 2045 " throw 'broccoli'; \n" |
2046 " } catch (e) { \n" | 2046 " } catch (e) { \n" |
2047 " return 'carrots'; \n" | 2047 " return 'carrots'; \n" |
2048 " } \n" | 2048 " } \n" |
2049 " return 'zucchini'; \n" | 2049 " return 'zucchini'; \n" |
2050 "} \n"; | 2050 "} \n"; |
2051 | 2051 |
2052 LoadScript(kScriptChars); | 2052 LoadScript(kScriptChars); |
2053 Dart_FinalizeLoading(); | 2053 Dart_FinalizeLoading(); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2305 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
2306 " null, 4, 13, 3, 14, 10," | 2306 " null, 4, 13, 3, 14, 10," |
2307 " null, 5, 17, 5, 18, 9, 19, 12," | 2307 " null, 5, 17, 5, 18, 9, 19, 12," |
2308 " null, 6, 21, 1," | 2308 " null, 6, 21, 1," |
2309 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2309 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
2310 " null, 9, 29, 1]", | 2310 " null, 9, 29, 1]", |
2311 tokens_cstr); | 2311 tokens_cstr); |
2312 } | 2312 } |
2313 | 2313 |
2314 } // namespace dart | 2314 } // namespace dart |
OLD | NEW |