| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_UNIT_TEST_H_ | 5 #ifndef VM_UNIT_TEST_H_ |
| 6 #define VM_UNIT_TEST_H_ | 6 #define VM_UNIT_TEST_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 | 134 |
| 135 #if defined(TARGET_ARCH_ARM) || \ | 135 #if defined(TARGET_ARCH_ARM) || \ |
| 136 defined(TARGET_ARCH_MIPS) || \ | 136 defined(TARGET_ARCH_MIPS) || \ |
| 137 defined(TARGET_ARCH_ARM64) | 137 defined(TARGET_ARCH_ARM64) |
| 138 #if defined(HOST_ARCH_ARM) || \ | 138 #if defined(HOST_ARCH_ARM) || \ |
| 139 defined(HOST_ARCH_MIPS) || \ | 139 defined(HOST_ARCH_MIPS) || \ |
| 140 defined(HOST_ARCH_ARM64) | 140 defined(HOST_ARCH_ARM64) |
| 141 // Running on actual ARM or MIPS hardware, execute code natively. | 141 // Running on actual ARM or MIPS hardware, execute code natively. |
| 142 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() | 142 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() |
| 143 #define EXECUTE_TEST_CODE_INT64(name, entry) reinterpret_cast<name>(entry)() |
| 143 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ | 144 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ |
| 144 reinterpret_cast<name>(entry)(long_arg0, long_arg1) | 145 reinterpret_cast<name>(entry)(long_arg0, long_arg1) |
| 145 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)() | 146 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)() |
| 146 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)() | 147 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)() |
| 147 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ | 148 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ |
| 148 reinterpret_cast<name>(entry)(float_arg) | 149 reinterpret_cast<name>(entry)(float_arg) |
| 149 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ | 150 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ |
| 150 reinterpret_cast<name>(entry)(double_arg) | 151 reinterpret_cast<name>(entry)(double_arg) |
| 151 #else | 152 #else |
| 152 // Not running on ARM or MIPS hardware, call simulator to execute code. | 153 // Not running on ARM or MIPS hardware, call simulator to execute code. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } \ | 405 } \ |
| 405 } else { \ | 406 } else { \ |
| 406 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ | 407 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ |
| 407 #handle); \ | 408 #handle); \ |
| 408 } \ | 409 } \ |
| 409 } while (0) | 410 } while (0) |
| 410 | 411 |
| 411 } // namespace dart | 412 } // namespace dart |
| 412 | 413 |
| 413 #endif // VM_UNIT_TEST_H_ | 414 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |