Skip to content

Commit

Permalink
Part nasa#80, Apply style
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Jul 26, 2023
1 parent 34d23ce commit da8fa6e
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 106 deletions.
10 changes: 5 additions & 5 deletions unit-test/sc_atsrq_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void SC_BeginAts_Test_AllCommandsSkipped(void)

UT_SetDeferredRetcode(UT_KEY(SC_CompareAbsTime), 1, true);

SC_AppData.AtsTimeIndexBuffer[0][0] = 1;
SC_AppData.AtsTimeIndexBuffer[0][0] = 1;
SC_OperData.AtsInfoTblAddr[0].NumberOfCommands = 1;

/* Set to cause all commnds to be skipped, to generate error message SC_ATS_SKP_ALL_ERR_EID */
Expand All @@ -412,7 +412,7 @@ void SC_BeginAts_Test_InvalidAtsIndex(void)

UT_SetDeferredRetcode(UT_KEY(SC_CompareAbsTime), 1, true);

SC_AppData.AtsTimeIndexBuffer[0][0] = 1;
SC_AppData.AtsTimeIndexBuffer[0][0] = 1;
SC_OperData.AtsInfoTblAddr[0].NumberOfCommands = 1;

/* Set to cause all commnds to be skipped, to generate error message SC_ATS_SKP_ALL_ERR_EID */
Expand Down Expand Up @@ -1019,7 +1019,7 @@ void ContinueAtsOnFailureCmd_Test_InvalidCmdLength(void)
void SC_AppendAtsCmd_Test_Nominal(void)
{
SC_AtsEntryHeader_t *Entry;
uint8 AtsIndex = 0;
uint8 AtsIndex = 0;
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_CMD_MID);
CFE_MSG_FcnCode_t FcnCode = SC_APPEND_ATS_CC;

Expand All @@ -1028,8 +1028,8 @@ void SC_AppendAtsCmd_Test_Nominal(void)

UT_SetDeferredRetcode(UT_KEY(SC_VerifyCmdLength), 1, true);

Entry = (SC_AtsEntryHeader_t *)&SC_OperData.AtsTblAddr[AtsIndex][0];
Entry->CmdNumber = 1;
Entry = (SC_AtsEntryHeader_t *)&SC_OperData.AtsTblAddr[AtsIndex][0];
Entry->CmdNumber = 1;

UT_CmdBuf.AppendAtsCmd.AtsId = 1;
SC_OperData.AtsInfoTblAddr[AtsIndex].NumberOfCommands = 1;
Expand Down
30 changes: 15 additions & 15 deletions unit-test/sc_cmds_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ void SC_ProcessAtpCmd_Test_CmdMid(void)

void SC_ProcessRtpCommand_Test_Nominal(void)
{
bool ChecksumValid;
bool ChecksumValid;

SC_AppData.NextCmdTime[SC_RTP] = 0;
SC_AppData.CurrentTime = 1;
Expand All @@ -704,7 +704,7 @@ void SC_ProcessRtpCommand_Test_Nominal(void)

void SC_ProcessRtpCommand_Test_BadSoftwareBusReturn(void)
{
bool ChecksumValid;
bool ChecksumValid;

SC_AppData.NextCmdTime[SC_RTP] = 0;
SC_AppData.CurrentTime = 1;
Expand Down Expand Up @@ -737,7 +737,7 @@ void SC_ProcessRtpCommand_Test_BadSoftwareBusReturn(void)

void SC_ProcessRtpCommand_Test_BadChecksum(void)
{
bool ChecksumValid;
bool ChecksumValid;

SC_AppData.NextCmdTime[SC_RTP] = 0;
SC_AppData.CurrentTime = 1;
Expand Down Expand Up @@ -841,8 +841,8 @@ void SC_ProcessRtpCommand_Test_RtsStatus(void)

void SC_SendHkPacket_Test(void)
{
uint8 i;
int32 LastRtsHkIndex = 0;
uint8 i;
int32 LastRtsHkIndex = 0;

SC_OperData.HkPacket.CmdErrCtr = 1;
SC_OperData.HkPacket.CmdCtr = 2;
Expand Down Expand Up @@ -973,7 +973,7 @@ void SC_ProcessRequest_Test_HkMID(void)
** Test case: SC_SEND_HK_MID
**/

CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);

Expand All @@ -992,7 +992,7 @@ void SC_ProcessRequest_Test_HkMIDNoVerifyCmdLength(void)
** Test case: SC_SEND_HK_MID
**/

CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);

Expand All @@ -1009,7 +1009,7 @@ void SC_ProcessRequest_Test_HkMIDAutoStartRts(void)
** Test case: SC_SEND_HK_MID
**/

CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);

SC_AppData.AutoStartRTS = 1;

Expand All @@ -1033,7 +1033,7 @@ void SC_ProcessRequest_Test_HkMIDAutoStartRtsLoaded(void)
** Test case: SC_SEND_HK_MID
**/

CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_SEND_HK_MID);

SC_AppData.AutoStartRTS = 1;
SC_OperData.RtsInfoTblAddr[SC_AppData.AutoStartRTS - 1].RtsStatus = SC_LOADED;
Expand All @@ -1057,7 +1057,7 @@ void SC_ProcessRequest_Test_1HzWakeupNONE(void)
/**
** Test case: SC_1HZ_WAKEUP_MID with SC_AppData.NextProcNumber == SC_NONE
**/
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
Expand All @@ -1083,7 +1083,7 @@ void SC_ProcessRequest_Test_1HzWakeupNoSwitchPending(void)
/**
** Test case: SC_1HZ_WAKEUP_MID with SC_OperData.AtsCtrlBlckAddr->SwitchPendFlag == false
**/
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
Expand All @@ -1109,7 +1109,7 @@ void SC_ProcessRequest_Test_1HzWakeupAtpNotExecutionTime(void)
/**
** Test case: SC_1HZ_WAKEUP_MID with a pending ATP command that should not execute yet
**/
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
Expand Down Expand Up @@ -1147,8 +1147,8 @@ void SC_ProcessRequest_Test_1HzWakeupRtpExecutionTime(void)
SC_CMDS_TEST_SC_UpdateNextTimeHook_RunCount = 0;
UT_SetHookFunction(UT_KEY(SC_UpdateNextTime), Ut_SC_UpdateNextTimeHook, NULL);

Entry = (SC_AtsEntryHeader_t *)&SC_OperData.AtsTblAddr[0][0];
Entry->CmdNumber = 1;
Entry = (SC_AtsEntryHeader_t *)&SC_OperData.AtsTblAddr[0][0];
Entry->CmdNumber = 1;

SC_AppData.NextProcNumber = SC_RTP;
SC_OperData.AtsCtrlBlckAddr->AtpState = SC_EXECUTING; /* Causes switch to ATP */
Expand Down Expand Up @@ -1176,7 +1176,7 @@ void SC_ProcessRequest_Test_1HzWakeupRtpExecutionTimeTooManyCmds(void)
** Test case: SC_1HZ_WAKEUP_MID with a pending RTP command that needs to execute immediately, but too many
*commands are being sent at once
**/
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(SC_1HZ_WAKEUP_MID);

UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);

Expand Down
Loading

0 comments on commit da8fa6e

Please sign in to comment.