diff --git a/ut_assert/inc/utassert.h b/ut_assert/inc/utassert.h index a24f0e200..6e9d6e1b3 100644 --- a/ut_assert/inc/utassert.h +++ b/ut_assert/inc/utassert.h @@ -143,6 +143,17 @@ typedef struct #define UtAssert_Type(Type,Expression,...) \ UtAssertEx(Expression, UTASSERT_CASETYPE_##Type, __FILE__, __LINE__, __VA_ARGS__) +/** + * \brief Compare addresses for equality with an auto-generated description message + */ +#define UtAssert_ADDRESS_EQ(actual,expect) do \ +{ \ + void *exp = (void*)(expect); \ + void *act = (void*)(actual); \ + UtAssert_True(act == exp, "%s (%p) == %s (%p)", \ + #actual, act, #expect, exp); \ +} while(0) \ + /** * \brief Compare two values for equality with an auto-generated description message * Values will be compared in an "int32" type context.