25#ifndef TEST_UTILS_EXPECT_H
26#define TEST_UTILS_EXPECT_H
48 printf(
"%s:%u => failed condition\n", file, line);
49 core_panic(PANIC_EXPECT_FAIL,
"CONDITION FAILED.");
80#define expect(cond) (likely(cond) ? (void)0 : _expect_failure(__FILE__, __LINE__))
Common macros and compiler attributes/pragmas configuration.
#define NORETURN
The NORETURN keyword tells the compiler to assume that the function cannot return.
#define printf(...)
A wrapper for the printf() function that passes arguments through unmodified, but fails to compile if...
static NORETURN void _expect_failure(const char *file, unsigned line)
Function to handle failed expectation.
NORETURN void core_panic(core_panic_t crash_code, const char *message)
Handle an unrecoverable error by halting or rebooting the system.
stdio wrapper to extend the C libs stdio