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 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 #if defined(TARGET_ARCH_IA32) || \ | |
14 defined(TARGET_ARCH_X64) || \ | |
15 defined(TARGET_ARCH_ARM) | |
16 | |
17 static bool breakpoint_hit = false; | 13 static bool breakpoint_hit = false; |
18 static int breakpoint_hit_counter = 0; | 14 static int breakpoint_hit_counter = 0; |
19 static Dart_Handle script_lib = NULL; | 15 static Dart_Handle script_lib = NULL; |
20 | 16 |
21 static const bool verbose = true; | 17 static const bool verbose = true; |
22 | 18 |
23 static void LoadScript(const char* source) { | 19 static void LoadScript(const char* source) { |
24 script_lib = TestCase::LoadTestScript(source, NULL); | 20 script_lib = TestCase::LoadTestScript(source, NULL); |
25 EXPECT_VALID(script_lib); | 21 EXPECT_VALID(script_lib); |
26 } | 22 } |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1527 Dart_SetExceptionThrownHandler(&StackTraceDump2ExceptionHandler); | 1523 Dart_SetExceptionThrownHandler(&StackTraceDump2ExceptionHandler); |
1528 breakpoint_hit_counter = 0; | 1524 breakpoint_hit_counter = 0; |
1529 Dart_SetExceptionPauseInfo(kPauseOnAllExceptions); | 1525 Dart_SetExceptionPauseInfo(kPauseOnAllExceptions); |
1530 | 1526 |
1531 Dart_Handle retval = Invoke("main"); | 1527 Dart_Handle retval = Invoke("main"); |
1532 EXPECT(Dart_IsError(retval)); | 1528 EXPECT(Dart_IsError(retval)); |
1533 EXPECT(Dart_IsUnhandledExceptionError(retval)); | 1529 EXPECT(Dart_IsUnhandledExceptionError(retval)); |
1534 EXPECT_EQ(1, breakpoint_hit_counter); | 1530 EXPECT_EQ(1, breakpoint_hit_counter); |
1535 } | 1531 } |
1536 | 1532 |
1537 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64 || TARGET_ARCH_ARM | |
1538 | |
1539 } // namespace dart | 1533 } // namespace dart |
OLD | NEW |