From cf2ebfa97d3f853f457db6855ff4451ab36095b7 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 30 Aug 2021 11:01:26 -0400 Subject: [PATCH] Fix #1912, Update time tests to use bitmask check macros Replace UtAssert_UINT32_EQ with bitmask-specific check macros --- modules/cfe_testcase/src/time_current_test.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/cfe_testcase/src/time_current_test.c b/modules/cfe_testcase/src/time_current_test.c index d639befbd..0149d22a4 100644 --- a/modules/cfe_testcase/src/time_current_test.c +++ b/modules/cfe_testcase/src/time_current_test.c @@ -126,30 +126,29 @@ void TestClock(void) UtPrintf("Testing: CFE_TIME_GetClockState, CFE_TIME_GetClockInfo"); CFE_TIME_ClockState_Enum_t state = CFE_TIME_GetClockState(); - uint16 ClockInfo = CFE_TIME_GetClockInfo(); if (state >= 0) { - UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_CLKSET); + UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_CLKSET); if (state == 0) { - UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_FLYING); + UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_FLYING); } else { - UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_FLYING); + UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_FLYING); } } else { - UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_CLKSET); + UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_CLKSET); } - UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_SRCINT); - UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_SIGPRI); - UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_REFERR); - UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_UNUSED); + UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_SRCINT); + UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_SIGPRI); + UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_REFERR); + UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_UNUSED); } void TimeCurrentTestSetup(void)