Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 809 Bytes

README.md

File metadata and controls

4 lines (3 loc) · 809 Bytes

scrutiny

A simple, easy to use, and lightweight unit testing framework written in and for C. Just make test functions that take void parameters and return void. Add their pointers to an array of scrutiny_unit_test_ts (these are typedefs of void (*func)(void)) and terminate the array with a NULL pointer, pass this array into scrutiny_run_tests() as the only argument and you get instant test feedback. Examples can be found in examples/.

To add scrutiny to your own projects just include the single header file and compile with the single scrutiny.c cource file. To run tests it may be benificial to use an #ifdef or similar switch out the main() function. Alternitavely you could create a seperate source directoy containing your tests, and include the code you want to test in that.