Skip to content

Commit cf2ebfa

Browse files
committed
Fix #1912, Update time tests to use bitmask check macros
Replace UtAssert_UINT32_EQ with bitmask-specific check macros
1 parent 97f39b6 commit cf2ebfa

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

modules/cfe_testcase/src/time_current_test.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -126,30 +126,29 @@ void TestClock(void)
126126
UtPrintf("Testing: CFE_TIME_GetClockState, CFE_TIME_GetClockInfo");
127127

128128
CFE_TIME_ClockState_Enum_t state = CFE_TIME_GetClockState();
129-
uint16 ClockInfo = CFE_TIME_GetClockInfo();
130129

131130
if (state >= 0)
132131
{
133-
UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_CLKSET);
132+
UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_CLKSET);
134133

135134
if (state == 0)
136135
{
137-
UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_FLYING);
136+
UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_FLYING);
138137
}
139138
else
140139
{
141-
UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_FLYING);
140+
UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_FLYING);
142141
}
143142
}
144143
else
145144
{
146-
UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_CLKSET);
145+
UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_CLKSET);
147146
}
148147

149-
UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_SRCINT);
150-
UtAssert_UINT32_EQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_SIGPRI);
151-
UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_REFERR);
152-
UtAssert_UINT32_NEQ(ClockInfo, ClockInfo | CFE_TIME_FLAG_UNUSED);
148+
UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_SRCINT);
149+
UtAssert_BITMASK_SET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_SIGPRI);
150+
UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_REFERR);
151+
UtAssert_BITMASK_UNSET(CFE_TIME_GetClockInfo(), CFE_TIME_FLAG_UNUSED);
153152
}
154153

155154
void TimeCurrentTestSetup(void)

0 commit comments

Comments
 (0)