| 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/unit_test.h" | 7 #include "vm/unit_test.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| 11 #if defined(TARGET_ARCH_IA32) // Only ia32 can run execution tests. | 11 // Only ia32 and x64 can run execution tests. |
| 12 | 12 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 13 | 13 |
| 14 static bool breakpoint_hit = false; | 14 static bool breakpoint_hit = false; |
| 15 | 15 |
| 16 static const bool verbose = false; | 16 static const bool verbose = false; |
| 17 | 17 |
| 18 #define EXPECT_NOT_ERROR(handle) \ | 18 #define EXPECT_NOT_ERROR(handle) \ |
| 19 if (Dart_IsError(handle)) { \ | 19 if (Dart_IsError(handle)) { \ |
| 20 OS::Print("Error: %s\n", Dart_GetError(handle)); \ | 20 OS::Print("Error: %s\n", Dart_GetError(handle)); \ |
| 21 } \ | 21 } \ |
| 22 EXPECT(!Dart_IsError(handle)); | 22 EXPECT(!Dart_IsError(handle)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 breakpoint_hit = false; | 74 breakpoint_hit = false; |
| 75 Dart_Handle retval = Dart_InvokeStatic(lib, | 75 Dart_Handle retval = Dart_InvokeStatic(lib, |
| 76 Dart_NewString(""), | 76 Dart_NewString(""), |
| 77 Dart_NewString("main"), | 77 Dart_NewString("main"), |
| 78 0, | 78 0, |
| 79 NULL); | 79 NULL); |
| 80 EXPECT(!Dart_IsError(retval)); | 80 EXPECT(!Dart_IsError(retval)); |
| 81 EXPECT(breakpoint_hit == true); | 81 EXPECT(breakpoint_hit == true); |
| 82 } | 82 } |
| 83 | 83 |
| 84 #endif // TARGET_ARCH_IA32. | 84 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 85 | 85 |
| 86 } // namespace dart | 86 } // namespace dart |
| OLD | NEW |