Go to the documentation of this file.
33 #ifndef SURICATA_UTIL_UNITTEST_H
34 #define SURICATA_UTIL_UNITTEST_H
61 if (unittests_fatal) { \
71 #define FAIL_IF(expr) do { \
72 if (unittests_fatal) { \
82 #define FAIL_IF_NOT(expr) do { \
89 #define FAIL_IF_NULL(expr) do { \
90 FAIL_IF(NULL == expr); \
96 #define FAIL_IF_NOT_NULL(expr) do { \
97 FAIL_IF(NULL != expr); \
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
void UtListTests(const char *regex_arg)
List all registered unit tests.
int UtRunSelftest(const char *regex_arg)
Run self tests.
void UtInitialize(void)
Initialize unit test list.
uint32_t UtRunTests(const char *regex_arg)
Run all registered unittests.
void UtCleanup(void)
Cleanup unit test list.
void UtRunModeRegister(void)