1 // csuite.h 2 3 /* 4 * C/C++ Users Journal Sept 2000 <br> 5 * The Simplest Automated Unit Test Framework That Could Possibly Work <br> 6 * Chuck Allison <br> 7 */ 8 9 #ifndef CSUITE_H 10 #define CSUITE_H 11 12 #include <stdio.h> 13 #include "Ctest.h" 14 15 typedef struct Suite Suite; 16 17 Suite* cs_create(const char* name); 18 void cs_destroy(Suite* pSuite, bool freeTests); 19 20 const char* cs_getName(Suite* pSuite); 21 long cs_getNumPassed(Suite* pSuite); 22 long cs_getNumFailed(Suite* pSuite); 23 long cs_getNumTests(Suite* pSuite); 24 FILE* cs_getStream(Suite* pSuite); 25 void cs_setStream(Suite* pSuite, FILE* stream); 26 27 bool cs_addTest(Suite* pSuite, Test* pTest); 28 bool cs_addSuite(Suite* pSuite, Suite* pSuite2); 29 void cs_run(Suite* pSuite); 30 long cs_report(Suite* pSuite); 31 void cs_reset(Suite* pSuite); 32 33 #endif 34