test.h

Go to the documentation of this file.
00001 
00071 #ifndef CFG_TEST_H
00072 #define CFG_TEST_H
00073 
00074 #include "cfg/cfg_arch.h"
00075 
00076 #if defined(ARCH_UNITTEST) && (ARCH & ARCH_UNITTEST)
00077     #define UNIT_TEST 1
00078 #else /* !TEST */
00079     #define UNIT_TEST 0
00080 #endif /* TEST */
00081 
00086 #define TEST_MAIN(module) \
00087 int main(void) \
00088 { \
00089     if (module##_testSetup() != 0) \
00090         return 1; \
00091     if (module##_testRun() != 0) \
00092         return 2; \
00093     if (module##_testTearDown() != 0) \
00094         return 3; \
00095     return 0; \
00096 }
00097 
00111 #define SILENT_ASSERT(str) kputs("SILENT_ASSERT:$"str"$\n")
00112 
00113 #endif /* CFG_TEST_H */