C/C++ header-only, lightweight, unit test framework
#include "zut.h"
int add(int a, int b) {
return a + b;
}
ZUT_START
ZUT_LOG("About to run test_add\n");
ZUT_TEST("test_add", {
AssertEqual(add(1, 2), 3);
})
ZUT_END
Compile it and you're good to go !
Don't forget to always enclose your test with ZUT_START and ZUT_END.
-
AssertEqual
-
AssertNotEqual
-
AssertTrue
-
AssertFalse
-
AssertNull
-
AssertNotNull
-
AssertThrow (C++ only)