Go to the documentation of this file.
39 #ifndef _PIC24_UNITTEST_H_
40 #define _PIC24_UNITTEST_H_
51 #define TOSTRING(x) _TOSTRING(x)
53 #define _TOSTRING(x) #x
60 #define ERROR_FILE_LINE(msg) "Error in " __FILE__ " line " TOSTRING(__LINE__) ": " msg
66 #define ASSERT(placeholder) (void)0
67 #define _COMPILE_ASSERT_SYMBOL_INNER(line, msg)
68 #define _COMPILE_ASSERT_SYMBOL(line, msg)
69 #define COMPILE_ASSERT(test, msg)
81 #define COMPILE_ASSERT(test, msg) \
82 typedef char _COMPILE_ASSERT_SYMBOL(__LINE__, msg) [ ((test) ? 1 : -1) ]
84 #define _COMPILE_ASSERT_SYMBOL_INNER(line, msg) __COMPILE_ASSERT_ ## line ## _____ ## msg
86 #define _COMPILE_ASSERT_SYMBOL(line, msg) _COMPILE_ASSERT_SYMBOL_INNER(line, msg)
95 #define ASSERT(test) picAssert(test, ERROR_FILE_LINE("ASSERT(" #test ") failed.\n"))
112 #endif // #ifndef _PIC24_UNITTEST_H_