unittest: FAIL macro to unconditionally fail a test

pull/2222/head
Jason Ish 9 years ago committed by Victor Julien
parent af4085b77b
commit 2a42e8be03

@ -54,6 +54,17 @@ void UtRunModeRegister(void);
extern int unittests_fatal;
/**
* \breif Fail a test.
*/
#define FAIL do { \
if (unittests_fatal) { \
BUG_ON(1); \
} else { \
return 0; \
} \
} while (0)
/**
* \brief Fail a test if expression evaluates to false.
*/

Loading…
Cancel
Save