Skip to content

Commit

Permalink
Merge pull request #42 from skliper/fix41-stray_printf
Browse files Browse the repository at this point in the history
Fix #41, Remove stray UT printf and clean related test
  • Loading branch information
dzbaker authored Aug 3, 2022
2 parents e484dc0 + c74745f commit 1f45f82
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions unit-test/sc_loads_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,16 @@ void SC_LoadAts_Test_Nominal(void)
* with the if-statement immediately after */
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), false);
printf("DONE WITH TEST SETUP\n");

/* Execute the function being tested */
SC_LoadAts(AtsIndex);
printf("AFTER FUNCTION RUN\n");
/* Verify results */
// UtAssert_True(SC_AppData.AtsCmdIndexBuffer[AtsIndex][0] == 0, "SC_AppData.AtsCmdIndexBuffer[AtsIndex][0] == 0");
// UtAssert_True(SC_OperData.AtsCmdStatusTblAddr[AtsIndex][0] == SC_LOADED,
// "SC_OperData.AtsCmdStatusTblAddr[AtsIndex][0] == SC_LOADED");
UtAssert_True(SC_OperData.AtsInfoTblAddr[AtsIndex].NumberOfCommands == 1,
"SC_OperData.AtsInfoTblAddr[AtsIndex].NumberOfCommands == 1");

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
/* Verify results */
UtAssert_INT32_EQ(SC_AppData.AtsCmdIndexBuffer[AtsIndex][0], 0);
UtAssert_UINT32_EQ(SC_OperData.AtsCmdStatusTblAddr[AtsIndex][0], SC_LOADED);
UtAssert_UINT32_EQ(SC_OperData.AtsInfoTblAddr[AtsIndex].NumberOfCommands, 1);

UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0",
call_count_CFE_EVS_SendEvent);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0);

} /* end SC_LoadAts_Test_Nominal */

Expand Down

0 comments on commit 1f45f82

Please sign in to comment.