| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 bit_cast<int32_t, uword>(entry), \ | 217 bit_cast<int32_t, uword>(entry), \ |
| 218 bit_cast<int32_t, float>(float_arg), \ | 218 bit_cast<int32_t, float>(float_arg), \ |
| 219 0, 0, 0, false, true)) | 219 0, 0, 0, false, true)) |
| 220 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ | 220 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ |
| 221 static_cast<int32_t>(Simulator::Current()->Call( \ | 221 static_cast<int32_t>(Simulator::Current()->Call( \ |
| 222 bit_cast<int32_t, uword>(entry), \ | 222 bit_cast<int32_t, uword>(entry), \ |
| 223 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ | 223 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ |
| 224 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), \ | 224 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), \ |
| 225 0, 0, false, true)) | 225 0, 0, false, true)) |
| 226 #endif // defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS) | 226 #endif // defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS) |
| 227 #else | |
| 228 // For DBC Assembler tests. | |
| 229 #define EXECUTE_TEST_CODE_INTPTR(code) \ | |
| 230 Smi::Value(Smi::RawCast(Simulator::Current()->Call( \ | |
| 231 code, \ | |
| 232 Array::Handle(ArgumentsDescriptor::New(0)), \ | |
| 233 Array::Handle(Array::New(0)), \ | |
| 234 Thread::Current()))) | |
| 235 #define EXECUTE_TEST_CODE_BOOL(code) \ | |
| 236 (Bool::RawCast(Simulator::Current()->Call( \ | |
| 237 code, \ | |
| 238 Array::Handle(ArgumentsDescriptor::New(0)), \ | |
| 239 Array::Handle(Array::New(0)), \ | |
| 240 Thread::Current())) == Bool::True().raw()) | |
| 241 #endif // defined(TARGET_ARCH_{ARM, ARM64, MIPS}) | 227 #endif // defined(TARGET_ARCH_{ARM, ARM64, MIPS}) |
| 242 | 228 |
| 243 | 229 |
| 244 inline Dart_Handle NewString(const char* str) { | 230 inline Dart_Handle NewString(const char* str) { |
| 245 return Dart_NewStringFromCString(str); | 231 return Dart_NewStringFromCString(str); |
| 246 } | 232 } |
| 247 | 233 |
| 248 | 234 |
| 249 namespace dart { | 235 namespace dart { |
| 250 | 236 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 // Yields: | 559 // Yields: |
| 574 // | 560 // |
| 575 // out = "\"id\":\"\"" | 561 // out = "\"id\":\"\"" |
| 576 // | 562 // |
| 577 void ElideJSONSubstring(const char* prefix, const char* in, char* out); | 563 void ElideJSONSubstring(const char* prefix, const char* in, char* out); |
| 578 | 564 |
| 579 | 565 |
| 580 } // namespace dart | 566 } // namespace dart |
| 581 | 567 |
| 582 #endif // VM_UNIT_TEST_H_ | 568 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |