From c4fe4bbb4cb9ca07491a971ac9d0948eaf1a117f Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Fri, 22 Jan 2021 16:21:26 -0500 Subject: [PATCH] Fix #780, Hex output for return checking ASSERTs --- fsw/cfe-core/unit-test/ut_support.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fsw/cfe-core/unit-test/ut_support.c b/fsw/cfe-core/unit-test/ut_support.c index 62a4454f1..7fbfeacfa 100644 --- a/fsw/cfe-core/unit-test/ut_support.c +++ b/fsw/cfe-core/unit-test/ut_support.c @@ -711,21 +711,21 @@ void UT_AddSubTest(void (*Test)(void), void (*Setup)(void), void (*Teardown)(voi void UT_SETUP_impl(const char *FileName, int LineNum, const char *TestName, const char *FnName, int32 FnRet) { - UtAssertEx(FnRet == CFE_SUCCESS, UTASSERT_CASETYPE_TSF, FileName, LineNum, "%s - Setup - %s returned %ld", + UtAssertEx(FnRet == CFE_SUCCESS, UTASSERT_CASETYPE_TSF, FileName, LineNum, "%s - Setup - %s returned 0x%lx", TestName, FnName, (long int)FnRet); } void UT_ASSERT_impl(const char *FileName, int LineNum, const char *TestName, const char *FnName, int32 FnRet) { - UtAssertEx(FnRet == CFE_SUCCESS, UtAssert_GetContext(), FileName, LineNum, "%s - %s returned %ld, expected CFE_SUCCESS", + UtAssertEx(FnRet == CFE_SUCCESS, UtAssert_GetContext(), FileName, LineNum, "%s - %s returned 0x%lx, expected CFE_SUCCESS", TestName, FnName, (long int)FnRet); } void UT_ASSERT_EQ_impl(const char *FileName, int LineNum, const char *FnName, int32 FnRet, const char *ExpName, int32 Exp) { - UtAssertEx(FnRet == Exp, UtAssert_GetContext(), FileName, LineNum, "%s - value %ld, expected %s[%ld]", - FnName, (long)FnRet, ExpName, (long)Exp); + UtAssertEx(FnRet == Exp, UtAssert_GetContext(), FileName, LineNum, "%s - value %ld 0x%lx, expected %s[%ld 0x%lx]", + FnName, (long)FnRet, (long)FnRet, ExpName, (long)Exp, (long)Exp); } void UT_ASSERT_TRUE_impl(const char *FileName, int LineNum, const char *TestName, @@ -751,7 +751,7 @@ void UT_EVTSENT_impl(const char *FileName, int LineNum, const char *TestName, co void UT_TEARDOWN_impl(const char *FileName, int LineNum, const char *TestName, const char *FnName, int32 FnRet) { - UtAssertEx(FnRet == CFE_SUCCESS, UTASSERT_CASETYPE_TTF, FileName, LineNum, "%s - Teardown failed (%s returned %ld)", + UtAssertEx(FnRet == CFE_SUCCESS, UTASSERT_CASETYPE_TTF, FileName, LineNum, "%s - Teardown failed (%s returned 0x%lx)", TestName, FnName, (long int)FnRet); }