house keeping
add some more logic for enum task
This commit is contained in:
@@ -70,7 +70,8 @@ extern "C"
|
||||
//--------------------------------------------------------------------+
|
||||
#define ASSERT_FILENAME __FILE__
|
||||
#define ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
#define ASSERT_STATEMENT _PRINTF("assert at %s: %s :%d :\n", ASSERT_FILENAME, ASSERT_FUNCTION, __LINE__)
|
||||
#define ASSERT_STATEMENT(format, ...)\
|
||||
_PRINTF("Assert at %s: %s:%d: " format "\n", ASSERT_FILENAME, ASSERT_FUNCTION, __LINE__, __VA_ARGS__)
|
||||
|
||||
#ifndef _TEST_ASSERT_
|
||||
#define ASSERT_ERROR_HANDLE(x) return (x)
|
||||
@@ -82,7 +83,7 @@ extern "C"
|
||||
do{\
|
||||
setup_statement;\
|
||||
if (!(condition)) {\
|
||||
_PRINTF("Assert at %s: %s:%d: " format "\n", ASSERT_FILENAME, ASSERT_FUNCTION, __LINE__, __VA_ARGS__);\
|
||||
ASSERT_STATEMENT(format, __VA_ARGS__);\
|
||||
ASSERT_ERROR_HANDLE(error);\
|
||||
}\
|
||||
}while(0)
|
||||
|
Reference in New Issue
Block a user