8#ifndef RUNTIME_VM_COMPILER_FFI_UNIT_TEST_H_
9#define RUNTIME_VM_COMPILER_FFI_UNIT_TEST_H_
17#define UNIT_TEST_CASE_WITH_EXPECTATION(name, expectation) \
18 void Dart_Test##name(); \
19 static const dart::compiler::ffi::RawTestCase kRegister##name( \
20 Dart_Test##name, #name, expectation); \
21 void Dart_Test##name()
23#define UNIT_TEST_CASE(name) UNIT_TEST_CASE_WITH_EXPECTATION(name, "Pass")
27#define UNIT_TEST_CASE_WITH_ZONE_WITH_EXPECTATION(name, expectation) \
28 static void Dart_TestHelper##name(dart::Zone* Z); \
29 UNIT_TEST_CASE_WITH_EXPECTATION(name, expectation) { \
31 Dart_TestHelper##name(&zone); \
33 static void Dart_TestHelper##name(dart::Zone* Z)
35#define UNIT_TEST_CASE_WITH_ZONE(name) \
36 UNIT_TEST_CASE_WITH_ZONE_WITH_EXPECTATION(name, "Pass")
42extern const char*
kArch;
43extern const char*
kOs;
54 const char*
name()
const {
return name_; }
57 virtual void Run() = 0;
71 const char* expectation_;
RawTestCase(RunEntry *run, const char *name, const char *expectation)
const char * name() const
static bool update_expectations
const char * expectation() const
void WriteToFile(char *path, const char *contents)
void ReadFromFile(char *path, char **buffer_pointer)