Testing --- File Layout: The test files mirror the src files, so a function in src/file.c would have a test in test/file.c --- Includes: #include "kpl_test.h" This is the only include a .c file in the test folder needs --- Writing Tests: TEST(test_name) { // TEST CODE } Tests pass by default --- Asserting: ASSERT(CONDITION, FAIL_MESSAGE); --- Failing: FAIL(FAIL_MESSAGE); --- Building: make kpl_test # build test exec make kpl_test_memory # build test exec with address, leak and undefined sanitizer make kpl_test_thread # build test exec with thread sanitizer All objects need to be built with the same sanitizer and do not run valgrind when sanitizers are added --- Running: ./kpl_test # Run all tests ./kpl_test NAME # Run test named NAME ./kpl_test NAME1 NAME2 ... # Run selected tests named NAM1 NAME2 ... ./kpl_test -h # Show help --- Compiler Flags: ---