| 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_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 result = DartEntry::InvokeFunction(function, Object::empty_array()); \ | 150 result = DartEntry::InvokeFunction(function, Object::empty_array()); \ |
| 151 EXPECT(!result.IsError()); \ | 151 EXPECT(!result.IsError()); \ |
| 152 Instance& actual = Instance::Handle(); \ | 152 Instance& actual = Instance::Handle(); \ |
| 153 actual ^= result.raw(); \ | 153 actual ^= result.raw(); \ |
| 154 EXPECT(actual.CanonicalizeEquals(Instance::Handle(expected))); \ | 154 EXPECT(actual.CanonicalizeEquals(Instance::Handle(expected))); \ |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 #if defined(TARGET_ARCH_ARM) || \ | 158 #if defined(TARGET_ARCH_ARM) || \ |
| 159 defined(TARGET_ARCH_MIPS) || \ | 159 defined(TARGET_ARCH_MIPS) || \ |
| 160 defined(TARGET_ARCH_ARM64) || \ | 160 defined(TARGET_ARCH_ARM64) |
| 161 defined(TARGET_ARCH_DBC) | |
| 162 #if defined(HOST_ARCH_ARM) || \ | 161 #if defined(HOST_ARCH_ARM) || \ |
| 163 defined(HOST_ARCH_MIPS) || \ | 162 defined(HOST_ARCH_MIPS) || \ |
| 164 defined(HOST_ARCH_ARM64) || \ | 163 defined(HOST_ARCH_ARM64) |
| 165 !defined(TARGET_ARCH_DBC) | |
| 166 // Running on actual ARM or MIPS hardware, execute code natively. | 164 // Running on actual ARM or MIPS hardware, execute code natively. |
| 167 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() | 165 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() |
| 168 #define EXECUTE_TEST_CODE_INT64(name, entry) reinterpret_cast<name>(entry)() | 166 #define EXECUTE_TEST_CODE_INT64(name, entry) reinterpret_cast<name>(entry)() |
| 169 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ | 167 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ |
| 170 reinterpret_cast<name>(entry)(long_arg0, long_arg1) | 168 reinterpret_cast<name>(entry)(long_arg0, long_arg1) |
| 171 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)() | 169 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)() |
| 172 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)() | 170 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)() |
| 173 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ | 171 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ |
| 174 reinterpret_cast<name>(entry)(float_arg) | 172 reinterpret_cast<name>(entry)(float_arg) |
| 175 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ | 173 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // Yields: | 559 // Yields: |
| 562 // | 560 // |
| 563 // out = "\"id\":\"\"" | 561 // out = "\"id\":\"\"" |
| 564 // | 562 // |
| 565 void ElideJSONSubstring(const char* prefix, const char* in, char* out); | 563 void ElideJSONSubstring(const char* prefix, const char* in, char* out); |
| 566 | 564 |
| 567 | 565 |
| 568 } // namespace dart | 566 } // namespace dart |
| 569 | 567 |
| 570 #endif // VM_UNIT_TEST_H_ | 568 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |