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
00083 #define TEST_MAIN(module) \
00084 int main(void) \
00085 { \
00086 if (module##_testSetup() != 0) \
00087 return 1; \
00088 if (module##_testRun() != 0) \
00089 return 2; \
00090 if (module##_testTearDown() != 0) \
00091 return 3; \
00092 return 0; \
00093 }
00094 #else
00095 #define UNIT_TEST 0
00096
00097 #define TEST_MAIN(module)
00098 #endif
00099
00100
00114 #define SILENT_ASSERT(str) kputs("SILENT_ASSERT:$"str"$\n")
00115
00116 #endif