#ifndef LILY_TEST_H #define LILY_TEST_H #include #include #include #include #define STR_IMP(x) #x #define STR(x) STR_IMP(x) /* define SOURCE_PATH_SIZE to strip away the leading parts of the full compilation path */ #ifndef SOURCE_PATH_SIZE #define LILY_LOCATION (__FILE__ ":" STR(__LINE__)) #else #define LILY_LOCATION ((__FILE__ ":" STR(__LINE__)) + SOURCE_PATH_SIZE) #endif struct lily_globals_t { jmp_buf env; char *error_msg; const char *error_location; }; extern struct lily_globals_t _lily_globals; void lily_assert_msg(bool statement, const char *location, const char *format_string, ...); #endif