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