/***** * test_framework.h * * A simple ok(boolean, message) testing system similar to perl's. * * Usage: * // from some other C file * #include "test_framework.h" * ok(10==10, "10 is 10"); * ok(15<10, "15 is smaller than 10"); * print_test_summary(); * exit(test_status()); * * which will print * 1 ok 10 is 10 * 2 not ok 15 is smaller than 10 * 1..2 * Failed 1 of 2 tests. * and exit with status=1, indicating an error. * * $Id: test_framework.h 12570 2007-04-09 16:44:25Z mahoney $ ******/ #ifndef __TEST_FRAMEWORK__ #define __TEST_FRAMEWORK__ 1 #include "utility.h" void ok(bool test_result, char* message); void print_test_summary(); int test_status(); // return 0 if all tests were succesfull; 1 otherwise. #endif