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