mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-12 01:10:49 +01:00
test/check: Add check_failed func
This commit is contained in:
parent
c5d39d82d5
commit
77906205b5
@ -139,4 +139,10 @@ void _Noreturn check_null_failed(const char *file, int line, const char *func,
|
|||||||
"\tValue is not null: %s\n"
|
"\tValue is not null: %s\n"
|
||||||
"\tExpected null value\n\n",
|
"\tExpected null value\n\n",
|
||||||
expr);
|
expr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _Noreturn check_failed(const char *file, int line,
|
||||||
|
const char *func, char *expr)
|
||||||
|
{
|
||||||
|
fail(file, line, func, "\t%s\n", expr);
|
||||||
}
|
}
|
@ -109,6 +109,16 @@
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
|
#define check_fail() \
|
||||||
|
{ \
|
||||||
|
check_failed(__FILE__, __LINE__, __func__, ""); \
|
||||||
|
} \
|
||||||
|
|
||||||
|
#define check_fail_msg(expr) \
|
||||||
|
{ \
|
||||||
|
check_failed(__FILE__, __LINE__, __func__, expr); \
|
||||||
|
} \
|
||||||
|
|
||||||
void _Noreturn check_char_eq_failed(const char *file, int line,
|
void _Noreturn check_char_eq_failed(const char *file, int line,
|
||||||
const char *func, char *expr, char result, char expected);
|
const char *func, char *expr, char result, char expected);
|
||||||
void _Noreturn check_char_neq_failed(const char *file, int line,
|
void _Noreturn check_char_neq_failed(const char *file, int line,
|
||||||
@ -132,5 +142,7 @@ void _Noreturn check_non_null_failed(const char *file, int line, const char *fun
|
|||||||
char *expr);
|
char *expr);
|
||||||
void _Noreturn check_null_failed(const char *file, int line, const char *func,
|
void _Noreturn check_null_failed(const char *file, int line, const char *func,
|
||||||
char *expr);
|
char *expr);
|
||||||
|
void _Noreturn check_failed(const char *file, int line,
|
||||||
|
const char *func, char *expr);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user