-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Change the following macro, to accept the function name func as well:
| #define VAMP_LOG_FORMAT_TYPE1(COLOR, LOG_TYPE, CALLER, FILE, LINE, FMT, ...)\ | |
| vampPrintf("[%s%s%s]\t{%s%s%s} %s:%ld %s" FMT "%s\n", \ | |
| COLOR, LOG_TYPE, VAMP_COLOR_DEFAULT, \ | |
| VAMP_COLOR_GREEN, CALLER, VAMP_COLOR_DEFAULT, \ | |
| FILE, LINE, COLOR, ##__VA_ARGS__, VAMP_COLOR_DEFAULT) |
Change the following:
| #define VAMP_ASSERT(cond)\ | |
| if ( !(cond) )\ | |
| {\ | |
| VAMP_LOG_FORMAT_ASSERT(#cond);\ | |
| vampExit(-1);\ | |
| } |
to something like:
#define VAMP_ASSERT(cond, fmt, ...)\
if ( !(cond) )\
{\
VAMP_LOG_FORMAT_ASSERT(fmt, ##__VA_ARGS__);\
vampExit(-1);\
}Add more macro assertions here:
VampEngine/Projects/VampTest/include/VampTest/vamptest.h
Lines 78 to 89 in 304a8b4
| #define VAMPTEST_ASSERT(cond)\ | |
| if ( !(cond) )\ | |
| {\ | |
| vampPrintf("[%sFAILED%s] {%s%s%s} %s:%ld:%s%s%s() %sREASON%s: %s%s%s\n",\ | |
| VAMP_COLOR_RED, VAMP_COLOR_DEFAULT, VAMP_COLOR_GREEN, pVamptestThis->m_full_name,\ | |
| VAMP_COLOR_DEFAULT, __FILE__, __LINE__, VAMP_COLOR_MAGENTA, __func__, VAMP_COLOR_DEFAULT,\ | |
| VAMP_COLOR_GREEN, VAMP_COLOR_DEFAULT, VAMP_COLOR_CYAN, #cond, VAMP_COLOR_DEFAULT\ | |
| );\ | |
| \ | |
| pVamptestThis->m_failed = 1;\ | |
| return;\ | |
| } |
like this:
#define VAMPTEST_ASSERT_EQUAL(provided, expected);
#define VAMPTEST_ASSERT_NOT_EQUAL(provided, expected);
#define VAMPTEST_ASSERT_LESS(provided, expected);
#define VAMPTEST_ASSERT_GREATER(provided, expected);
#define VAMPTEST_ASSERT_LESS_EQUAL(provided, expected);
#define VAMPTEST_ASSERT_GREATER_EQUAL(provided, expected);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request