Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: runtime/vm/unit_test.h

Issue 1944503002: Adds more DBC assembler tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stack_frame.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698