fix TASK_ASSERT for osal_none.h
add TASK_ASSERT test for osal_none integrate test project better with eclipse - assert message--> info windows - test fail --> error windows
This commit is contained in:
@@ -68,8 +68,13 @@ extern "C"
|
||||
//--------------------------------------------------------------------+
|
||||
// Assert Helper
|
||||
//--------------------------------------------------------------------+
|
||||
#define ASSERT_MESSAGE(format, ...)\
|
||||
_PRINTF("Assert at %s %s %d: " format "\n", __BASE_FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
#ifndef _TEST_
|
||||
#define ASSERT_MESSAGE(format, ...)\
|
||||
_PRINTF("Assert at %s: %s: %d: " format "\n", __BASE_FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
#else
|
||||
#define ASSERT_MESSAGE(format, ...)\
|
||||
_PRINTF("%d:note: Assert " format "\n", __LINE__, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef _TEST_ASSERT_
|
||||
#define ASSERT_ERROR_HANDLER(x, para) return (x)
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef uint32_t osal_task_t;
|
||||
|
||||
#define TASK_ASSERT_STATUS_HANDLER(sts, func_call) \
|
||||
ASSERT_DEFINE_WITH_HANDLER(TASK_ASSERT_ERROR_HANDLER, func_call, tusb_error_t status = (tusb_error_t)(sts),\
|
||||
TUSB_ERROR_NONE == status, status, "%s", TUSB_ErrorStr[status])
|
||||
TUSB_ERROR_NONE == status, (void) 0, "%s", TUSB_ErrorStr[status])
|
||||
|
||||
#define TASK_ASSERT_STATUS(sts) \
|
||||
ASSERT_DEFINE(tusb_error_t status = (tusb_error_t)(sts),\
|
||||
|
||||
@@ -91,7 +91,7 @@ uint32_t osal_tick_get(void);
|
||||
}
|
||||
|
||||
#define TASK_ASSERT_ERROR_HANDLER(error, func_call) \
|
||||
func_call; state = 0; break
|
||||
func_call; state = 0; return
|
||||
|
||||
#define TASK_ASSERT_STATUS_HANDLER(sts, func_call) \
|
||||
ASSERT_DEFINE_WITH_HANDLER(TASK_ASSERT_ERROR_HANDLER, func_call, tusb_error_t status = (tusb_error_t)(sts),\
|
||||
|
||||
Reference in New Issue
Block a user