code_snippets/c_projects/x_tfw4c/tests/test.c
xavi 5905cb67b0 Added the test framework to the tests directory
Separated the test framework into the header. Test definitions should be
placed in the test.c.
2025-12-23 21:46:32 -08:00

30 lines
326 B
C

#include "test.h"
// INCLUDE PROJECT HEADERS
#include "hello_world.h"
// DEFINE TESTS
TEST(success){
return 0;
}
TEST(fail){
int i = 1;
assert(i == 0);
printf("after assert\n");
return i;
}
TEST(segfault){
int* x = NULL;
int y = *x;
return y;
}
// END OF TEST DEFINITIONS
int main(void){
return run_tests();
}