From c80459f148fde81eb7006c982a0892bf86f1ba74 Mon Sep 17 00:00:00 2001 From: Avi Date: Sun, 9 Oct 2022 16:13:35 +1000 Subject: [PATCH] Fix #48, Comments and empty lines cleanup --- fsw/src/hs_app.c | 23 +--- fsw/src/hs_cmds.c | 45 +++---- fsw/src/hs_custom.c | 31 ++--- fsw/src/hs_custom.h | 1 - fsw/src/hs_monitors.c | 34 ++---- fsw/src/hs_msg.h | 1 - fsw/src/hs_utils.c | 4 +- fsw/tables/hs_amt.c | 5 - fsw/tables/hs_emt.c | 5 - fsw/tables/hs_mat.c | 5 - fsw/tables/hs_xct.c | 5 - unit-test/hs_app_tests.c | 143 +++++++--------------- unit-test/hs_cmds_tests.c | 217 +++++++++++----------------------- unit-test/hs_custom_tests.c | 80 ++++--------- unit-test/hs_monitors_tests.c | 191 ++++++++++-------------------- unit-test/hs_utils_tests.c | 9 +- 16 files changed, 250 insertions(+), 549 deletions(-) diff --git a/fsw/src/hs_app.c b/fsw/src/hs_app.c index 56ebdfc..5c5caf9 100644 --- a/fsw/src/hs_app.c +++ b/fsw/src/hs_app.c @@ -161,7 +161,6 @@ void HS_AppMain(void) */ RunStatus = CFE_ES_RunStatus_APP_ERROR; } - } /* end CFS_ES_RunLoop while */ /* @@ -192,8 +191,7 @@ void HS_AppMain(void) ** Exit the application */ CFE_ES_ExitApp(RunStatus); - -} /* end HS_AppMain */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -340,8 +338,7 @@ int32 HS_AppInit(void) HS_MAJOR_VERSION, HS_MINOR_VERSION, HS_REVISION, HS_MISSION_REV); return Status; - -} /* end HS_AppInit */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -414,8 +411,7 @@ int32 HS_SbInit(void) */ return Status; - -} /* End of HS_SbInit() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -531,8 +527,7 @@ int32 HS_TblInit(void) HS_AcquirePointers(); return CFE_SUCCESS; - -} /* End of HS_TblInit() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -602,8 +597,7 @@ int32 HS_ProcessMain(void) } return Status; - -} /* End of HS_ProcessMain() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -670,9 +664,4 @@ int32 HS_ProcessCommands(void) } return Status; - -} /* End of HS_ProcessCommands() */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/fsw/src/hs_cmds.c b/fsw/src/hs_cmds.c index 05540f4..89f32b4 100644 --- a/fsw/src/hs_cmds.c +++ b/fsw/src/hs_cmds.c @@ -48,7 +48,6 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr) switch (CFE_SB_MsgIdToValue(MessageID)) { - /* ** Housekeeping telemetry request */ @@ -137,7 +136,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr) break; } /* end MessageID switch */ -} /* End HS_AppPipe */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -239,7 +238,6 @@ void HS_HousekeepingReq(const CFE_SB_Buffer_t *BufPtr) */ for (TableIndex = 0; TableIndex < HS_MAX_EXEC_CNT_SLOTS; TableIndex++) { - ExeCount = HS_INVALID_EXECOUNT; if (HS_AppData.ExeCountState == HS_STATE_ENABLED) @@ -293,7 +291,7 @@ void HS_HousekeepingReq(const CFE_SB_Buffer_t *BufPtr) CFE_SB_TransmitMsg(&HS_AppData.HkPacket.TlmHeader.Msg, true); } /* end HS_VerifyMsgLength if */ -} /* end HS_HousekeepingCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -314,7 +312,7 @@ void HS_NoopCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command: Version %d.%d.%d.%d", HS_MAJOR_VERSION, HS_MINOR_VERSION, HS_REVISION, HS_MISSION_REV); } -} /* end HS_NoopCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -334,7 +332,7 @@ void HS_ResetCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_RESET_DBG_EID, CFE_EVS_EventType_DEBUG, "Reset counters command"); } -} /* end HS_ResetCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -347,7 +345,7 @@ void HS_ResetCounters(void) HS_AppData.CmdErrCount = 0; HS_AppData.EventsMonitoredCount = 0; HS_AppData.MsgActExec = 0; -} /* end HS_ResetCounters */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -368,7 +366,7 @@ void HS_EnableAppMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAppMonState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Enabled"); } -} /* end HS_EnableAppMonCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -388,7 +386,7 @@ void HS_DisableAppMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAppMonState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_APPMON_DBG_EID, CFE_EVS_EventType_DEBUG, "Application Monitoring Disabled"); } -} /* end HS_DisableAppMonCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -410,7 +408,6 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) */ if (HS_AppData.CurrentEventMonState == HS_STATE_DISABLED) { - Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), HS_AppData.EventPipe, CFE_SB_DEFAULT_QOS, HS_EVENT_PIPE_DEPTH); @@ -446,7 +443,7 @@ void HS_EnableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CmdErrCount++; } } -} /* end HS_EnableEventMonCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -463,13 +460,11 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) */ if (HS_VerifyMsgLength(&BufPtr->Msg, ExpectedLength)) { - /* ** Unsubscribe from Event Messages if currently enabled */ if (HS_AppData.CurrentEventMonState == HS_STATE_ENABLED) { - Status = CFE_SB_Unsubscribe(CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), HS_AppData.EventPipe); if (Status != CFE_SUCCESS) @@ -503,7 +498,7 @@ void HS_DisableEventMonCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CmdErrCount++; } } -} /* end HS_DisableEventMonCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -523,7 +518,7 @@ void HS_EnableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAlivenessState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Enabled"); } -} /* end HS_EnableAlivenessCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -543,7 +538,7 @@ void HS_DisableAlivenessCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentAlivenessState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_ALIVENESS_DBG_EID, CFE_EVS_EventType_DEBUG, "Aliveness Indicator Disabled"); } -} /* end HS_DisableAlivenessCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -563,7 +558,7 @@ void HS_EnableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentCPUHogState = HS_STATE_ENABLED; CFE_EVS_SendEvent(HS_ENABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Enabled"); } -} /* end HS_EnableCPUHogCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -583,7 +578,7 @@ void HS_DisableCPUHogCmd(const CFE_SB_Buffer_t *BufPtr) HS_AppData.CurrentCPUHogState = HS_STATE_DISABLED; CFE_EVS_SendEvent(HS_DISABLE_CPUHOG_DBG_EID, CFE_EVS_EventType_DEBUG, "CPU Hogging Indicator Disabled"); } -} /* end HS_DisableCPUHogCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -604,7 +599,7 @@ void HS_ResetResetsPerformedCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_RESET_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG, "Processor Resets Performed by HS Counter has been Reset"); } -} /* end HS_ResetResetsPerformedCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -629,7 +624,7 @@ void HS_SetMaxResetsCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_SET_MAX_RESETS_DBG_EID, CFE_EVS_EventType_DEBUG, "Max Resets Performable by HS has been set to %d", HS_AppData.CDSData.MaxResets); } -} /* end HS_SetMaxResetsCmd */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -834,7 +829,7 @@ void HS_AcquirePointers(void) } #endif -} /* End of HS_AcquirePointers */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -873,7 +868,7 @@ void HS_AppMonStatusRefresh(void) (TableIndex % HS_BITS_PER_APPMON_ENABLE)); } } -} /* end HS_AppMonStatusRefresh */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -891,8 +886,4 @@ void HS_MsgActsStatusRefresh(void) { HS_AppData.MsgActCooldown[TableIndex] = 0; } -} /* end HS_MsgActsStatusRefresh */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/fsw/src/hs_custom.c b/fsw/src/hs_custom.c index 8e9c397..bbabbf8 100644 --- a/fsw/src/hs_custom.c +++ b/fsw/src/hs_custom.c @@ -54,7 +54,6 @@ void HS_IdleTask(void) while (HS_CustomData.IdleTaskRunStatus == CFE_SUCCESS) { - /* Check to see if we are to mark the time. */ if (((HS_CustomData.ThisIdleTaskExec & HS_CustomData.UtilMask) == HS_CustomData.UtilMask) && (HS_CustomData.ThisIdleTaskExec > HS_CustomData.UtilMask)) @@ -79,7 +78,7 @@ void HS_IdleTask(void) /* Thread cancellation point/give up CPU */ OS_TaskDelay(0); } -} /* End of HS_IdleTask() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -129,8 +128,7 @@ int32 HS_CustomInit(void) HS_CustomData.UtilCallsPerMark = HS_UTIL_CALLS_PER_MARK; return Status; - -} /* end HS_CustomInit */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -155,8 +153,7 @@ void HS_CustomCleanup(void) ** Delete the Idle Task */ CFE_ES_DeleteChildTask(HS_CustomData.IdleTaskID); - -} /* end HS_CustomCleanup */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -166,7 +163,7 @@ void HS_CustomCleanup(void) void HS_UtilizationIncrement(void) { HS_CustomData.ThisIdleTaskExec++; -} /* end HS_UtilizationIncrement */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -185,7 +182,7 @@ void HS_UtilizationMark(void) HS_CustomData.LastIdleTaskExec = HS_CustomData.ThisIdleTaskExec; CycleCount = 0; } -} /* end HS_UtilizationMark */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -198,7 +195,7 @@ void HS_MarkIdleCallback(void) ** Capture the CPU Utilization (at a consistant time) */ HS_UtilizationMark(); -} /* End of HS_MarkIdleCallback() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -215,8 +212,7 @@ void HS_CustomMonitorUtilization(void) HS_MonitorUtilization(); HS_CustomData.UtilCycleCounter = 0; } - -} /* End of HS_CustomMonitorUtilization() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -256,8 +252,7 @@ int32 HS_CustomCommands(const CFE_SB_Buffer_t *BufPtr) } /* end CommandCode switch */ return Status; - -} /* End of HS_CustomCommands() */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -364,7 +359,7 @@ void HS_UtilDiagReport(void) (unsigned int)HS_CustomData.UtilMask, (int)OutputValue[OutputOrdinal[0]], (int)OutputCount[OutputOrdinal[0]], (int)OutputValue[OutputOrdinal[1]], (int)OutputCount[OutputOrdinal[1]], (int)OutputValue[OutputOrdinal[2]], (int)OutputCount[OutputOrdinal[2]], (int)OutputValue[OutputOrdinal[3]], (int)OutputCount[OutputOrdinal[3]]); -} /* end HS_UtilDiagReport */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -417,7 +412,7 @@ void HS_SetUtilParamsCmd(const CFE_SB_Buffer_t *BufPtr) (int)CmdPtr->Mult1, (int)CmdPtr->Div, (int)CmdPtr->Mult2); } } -} /* end HS_SetUtilParamsCmd */ +} void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr) { @@ -436,8 +431,4 @@ void HS_SetUtilDiagCmd(const CFE_SB_Buffer_t *BufPtr) CFE_EVS_SendEvent(HS_SET_UTIL_DIAG_DBG_EID, CFE_EVS_EventType_DEBUG, "Utilization Diagnostics Mask has been set to %08X", (unsigned int)HS_CustomData.UtilMask); } -} /* end HS_SetUtilDiagCmd */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/fsw/src/hs_custom.h b/fsw/src/hs_custom.h index f69c061..46b89c2 100644 --- a/fsw/src/hs_custom.h +++ b/fsw/src/hs_custom.h @@ -270,7 +270,6 @@ typedef struct int32 IdleTaskRunStatus; /**< \brief HS Idle Task Run Status */ CFE_ES_TaskId_t IdleTaskID; /**< \brief HS Idle Task Task ID */ - } HS_CustomData_t; /** diff --git a/fsw/src/hs_monitors.c b/fsw/src/hs_monitors.c index f63c98d..933ec36 100644 --- a/fsw/src/hs_monitors.c +++ b/fsw/src/hs_monitors.c @@ -55,7 +55,6 @@ void HS_MonitorApplications(void) for (TableIndex = 0; TableIndex < HS_MAX_MONITORED_APPS; TableIndex++) { - ActionType = HS_AppData.AMTablePtr[TableIndex].ActionType; /* @@ -106,7 +105,6 @@ void HS_MonitorApplications(void) */ if (HS_AppData.AppMonCheckInCountdown[TableIndex] == 0) { - /* ** Unset the enabled bit flag */ @@ -114,7 +112,6 @@ void HS_MonitorApplications(void) (TableIndex % HS_BITS_PER_APPMON_ENABLE)); switch (ActionType) { - case HS_AMT_ACT_PROC_RESET: CFE_EVS_SendEvent(HS_APPMON_PROC_ERR_EID, CFE_EVS_EventType_ERROR, "App Monitor Failure: APP:(%s): Action: Processor Reset", @@ -216,7 +213,7 @@ void HS_MonitorApplications(void) } /* end (HS_AppData.AppMonCheckInCountdown[TableIndex] != 0) if */ } /* end for loop */ -} /* end HS_MonitorApplications */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -245,13 +242,11 @@ void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr) if (strncmp(HS_AppData.EMTablePtr[TableIndex].AppName, EventPtr->Payload.PacketID.AppName, OS_MAX_API_NAME) == 0) { - /* ** Perform the action if the strings also match */ switch (ActionType) { - case HS_EMT_ACT_PROC_RESET: CFE_EVS_SendEvent(HS_EVENTMON_PROC_ERR_EID, CFE_EVS_EventType_ERROR, "Event Monitor: APP:(%s) EID:(%d): Action: Processor Reset", @@ -339,7 +334,6 @@ void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr) */ if ((HS_AppData.MsgActsState == HS_STATE_ENABLED) && (MsgActsIndex < HS_MAX_MSG_ACT_TYPES)) { - /* ** Send the message if off cooldown and not disabled */ @@ -371,7 +365,7 @@ void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr) } /* end EventID comparison */ } /* end for loop */ -} /* end HS_MonitorEvent */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -448,7 +442,7 @@ void HS_MonitorUtilization(void) HS_AppData.UtilCpuAvg = (CombinedUtil / HS_UTIL_AVERAGE_NUM_INTERVAL); HS_AppData.UtilCpuPeak = PeakUtil; -} /* end HS_MonitorUtilization */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -482,7 +476,6 @@ int32 HS_ValidateAMTable(void *TableData) for (TableIndex = 0; TableIndex < HS_MAX_MONITORED_APPS; TableIndex++) { - ActionType = TableArray[TableIndex].ActionType; CycleCount = TableArray[TableIndex].CycleCount; NullTerm = TableArray[TableIndex].NullTerm; @@ -540,8 +533,7 @@ int32 HS_ValidateAMTable(void *TableData) (int)UnusedCount); return TableResult; - -} /* end HS_ValidateAMTable */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -575,7 +567,6 @@ int32 HS_ValidateEMTable(void *TableData) for (TableIndex = 0; TableIndex < HS_MAX_MONITORED_EVENTS; TableIndex++) { - ActionType = TableArray[TableIndex].ActionType; EventID = TableArray[TableIndex].EventID; NullTerm = TableArray[TableIndex].NullTerm; @@ -633,8 +624,7 @@ int32 HS_ValidateEMTable(void *TableData) (int)UnusedCount); return TableResult; - -} /* end HS_ValidateEMTable */ +} #if HS_MAX_EXEC_CNT_SLOTS != 0 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -668,7 +658,6 @@ int32 HS_ValidateXCTable(void *TableData) for (TableIndex = 0; TableIndex < HS_MAX_EXEC_CNT_SLOTS; TableIndex++) { - ResourceType = TableArray[TableIndex].ResourceType; NullTerm = TableArray[TableIndex].NullTerm; EntryResult = HS_XCTVAL_NO_ERR; @@ -727,8 +716,7 @@ int32 HS_ValidateXCTable(void *TableData) (int)UnusedCount); return TableResult; - -} /* end HS_ValidateXCTable */ +} #endif /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -763,7 +751,6 @@ int32 HS_ValidateMATable(void *TableData) for (TableIndex = 0; TableIndex < HS_MAX_MSG_ACT_TYPES; TableIndex++) { - EntryResult = HS_MATVAL_NO_ERR; BufPtr = (CFE_SB_Buffer_t *)&TableArray[TableIndex].MsgBuf; CFE_MSG_GetSize(&BufPtr->Msg, &Length); @@ -828,8 +815,7 @@ int32 HS_ValidateMATable(void *TableData) (int)UnusedCount); return TableResult; - -} /* end HS_ValidateMATable */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ @@ -852,8 +838,4 @@ void HS_SetCDSData(uint16 ResetsPerformed, uint16 MaxResets) { CFE_ES_CopyToCDS(HS_AppData.MyCDSHandle, &HS_AppData.CDSData); } -} /* end HS_SetCDSData */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/fsw/src/hs_msg.h b/fsw/src/hs_msg.h index ed184a4..8467a4b 100644 --- a/fsw/src/hs_msg.h +++ b/fsw/src/hs_msg.h @@ -114,7 +114,6 @@ typedef struct #if HS_MAX_EXEC_CNT_SLOTS != 0 uint32 ExeCounts[HS_MAX_EXEC_CNT_SLOTS]; /**< \brief Execution Counters */ #endif - } HS_HkPacket_t; /**\}*/ diff --git a/fsw/src/hs_utils.c b/fsw/src/hs_utils.c index a91501e..52b94aa 100644 --- a/fsw/src/hs_utils.c +++ b/fsw/src/hs_utils.c @@ -52,7 +52,6 @@ bool HS_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength) CFE_MSG_GetSize(MsgPtr, &ActualLength); if (ExpectedLength != ActualLength) { - CFE_MSG_GetMsgId(MsgPtr, &MessageID); CFE_MSG_GetFcnCode(MsgPtr, &CommandCode); @@ -83,8 +82,7 @@ bool HS_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength) } return result; - -} /* End of HS_VerifyMsgLength */ +} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ diff --git a/fsw/tables/hs_amt.c b/fsw/tables/hs_amt.c index 4914f52..9e6c6d9 100644 --- a/fsw/tables/hs_amt.c +++ b/fsw/tables/hs_amt.c @@ -69,9 +69,4 @@ HS_AMTEntry_t HS_Default_AppMon_Tbl[HS_MAX_MONITORED_APPS] = { /* 29 */ {"", 0, 10, HS_AMT_ACT_NOACT}, /* 30 */ {"", 0, 10, HS_AMT_ACT_NOACT}, /* 31 */ {"", 0, 10, HS_AMT_ACT_NOACT}, - }; - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/fsw/tables/hs_emt.c b/fsw/tables/hs_emt.c index b94a8d6..bc1325e 100644 --- a/fsw/tables/hs_emt.c +++ b/fsw/tables/hs_emt.c @@ -53,9 +53,4 @@ HS_EMTEntry_t HS_Default_EventMon_Tbl[HS_MAX_MONITORED_EVENTS] = { /* 13 */ {"", 0, 10, HS_EMT_ACT_NOACT}, /* 14 */ {"", 0, 10, HS_EMT_ACT_NOACT}, /* 15 */ {"", 0, 10, HS_EMT_ACT_NOACT}, - }; - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/fsw/tables/hs_mat.c b/fsw/tables/hs_mat.c index b2985b7..6b2ca68 100644 --- a/fsw/tables/hs_mat.c +++ b/fsw/tables/hs_mat.c @@ -68,9 +68,4 @@ HS_MATEntry_t HS_Default_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = { {HS_MAT_STATE_DISABLED, 10, {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - }; - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/fsw/tables/hs_xct.c b/fsw/tables/hs_xct.c index adf02b2..9d2c365 100644 --- a/fsw/tables/hs_xct.c +++ b/fsw/tables/hs_xct.c @@ -69,9 +69,4 @@ HS_XCTEntry_t HS_Default_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = { /* 29 */ {"", 0, HS_XCT_TYPE_NOTYPE}, /* 30 */ {"", 0, HS_XCT_TYPE_NOTYPE}, /* 31 */ {"", 0, HS_XCT_TYPE_NOTYPE}, - }; - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/unit-test/hs_app_tests.c b/unit-test/hs_app_tests.c index 9746df1..cac38ef 100644 --- a/unit-test/hs_app_tests.c +++ b/unit-test/hs_app_tests.c @@ -127,7 +127,6 @@ int32 HS_APP_TEST_CFE_ES_RestoreFromCDSHook(void *UserObj, int32 StubRetcode, ui int32 HS_APP_TEST_CFE_ES_WaitForStartupSyncHook1(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context) { - UT_WaitForStartupSyncTimeout = UT_Hook_GetArgValueByName(Context, "TimeOutMilliseconds", uint32); /* This functionality is not directly related to WaitForStartupSync, but WaitForStartupSync is in a place where @@ -186,8 +185,7 @@ void HS_AppMain_Test_NominalWaitForStartupSync(void) /* 1 event message that we don't care about in this test */ UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - -} /* end HS_AppMain_Test_NominalWaitForStartupSync */ +} void HS_AppMain_Test_NominalRcvMsgSuccess(void) { @@ -215,8 +213,7 @@ void HS_AppMain_Test_NominalRcvMsgSuccess(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMain_Test_NominalRcvMsgSuccess */ +} void HS_AppMain_Test_NominalRcvMsgNoMessage(void) { @@ -248,8 +245,7 @@ void HS_AppMain_Test_NominalRcvMsgNoMessage(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMain_Test_NominalRcvMsgNoMessage */ +} void HS_AppMain_Test_NominalRcvMsgTimeOut(void) { @@ -281,12 +277,10 @@ void HS_AppMain_Test_NominalRcvMsgTimeOut(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMain_Test_NominalRcvMsgTimeOut */ +} void HS_AppMain_Test_NominalRcvMsgError(void) { - /* Set to make loop execute exactly once */ UT_SetDeferredRetcode(UT_KEY(CFE_ES_RunLoop), 1, true); @@ -316,8 +310,7 @@ void HS_AppMain_Test_NominalRcvMsgError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMain_Test_NominalRcvMsgError */ +} void HS_AppMain_Test_AppInitNotSuccess(void) { @@ -359,8 +352,7 @@ void HS_AppMain_Test_AppInitNotSuccess(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* end HS_AppMain_Test_AppInitNotSuccess */ +} void HS_AppMain_Test_ProcessMainNotSuccess(void) { @@ -395,8 +387,7 @@ void HS_AppMain_Test_ProcessMainNotSuccess(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* end HS_AppMain_Test_ProcessMainNotSuccess */ +} void HS_AppMain_Test_SBSubscribeEVSLongError(void) { @@ -452,8 +443,7 @@ void HS_AppMain_Test_SBSubscribeEVSLongError(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* HS_AppMain_Test_SBSubscribeEVSLongError */ +} void HS_AppMain_Test_SBSubscribeEVSShortError(void) { @@ -509,8 +499,7 @@ void HS_AppMain_Test_SBSubscribeEVSShortError(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* HS_AppMain_Test_SBSubscribeEVSShortError */ +} void HS_AppMain_Test_RcvMsgError(void) { @@ -551,12 +540,10 @@ void HS_AppMain_Test_RcvMsgError(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* HS_AppMain_Test_RcvMsgError */ +} void HS_AppMain_Test_StateDisabled(void) { - /* Set so the loop will never be run */ UT_SetDeferredRetcode(UT_KEY(CFE_ES_RunLoop), 1, false); @@ -577,8 +564,7 @@ void HS_AppMain_Test_StateDisabled(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMain_Test_StateDisabled */ +} void HS_AppInit_Test_Nominal(void) { @@ -634,8 +620,7 @@ void HS_AppInit_Test_Nominal(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_Nominal */ +} void HS_AppInit_Test_EVSRegisterError(void) { @@ -687,8 +672,7 @@ void HS_AppInit_Test_EVSRegisterError(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* end HS_AppInit_Test_EVSRegisterError */ +} void HS_AppInit_Test_CorruptCDSResetsPerformed(void) { @@ -762,8 +746,7 @@ void HS_AppInit_Test_CorruptCDSResetsPerformed(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_CorruptCDSResetsPerformed */ +} void HS_AppInit_Test_CorruptCDSMaxResets(void) { @@ -834,8 +817,7 @@ void HS_AppInit_Test_CorruptCDSMaxResets(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_CorruptCDSMaxResets */ +} void HS_AppInit_Test_CorruptCDSNoEvent(void) { @@ -891,8 +873,7 @@ void HS_AppInit_Test_CorruptCDSNoEvent(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_CorruptCDSNoEvent */ +} void HS_AppInit_Test_RestoreCDSError(void) { @@ -945,8 +926,7 @@ void HS_AppInit_Test_RestoreCDSError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_RestoreCDSError */ +} void HS_AppInit_Test_DisableSavingToCDS(void) { @@ -1001,8 +981,7 @@ void HS_AppInit_Test_DisableSavingToCDS(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_DisableSavingToCDS */ +} void HS_AppInit_Test_SBInitError(void) { @@ -1059,8 +1038,7 @@ void HS_AppInit_Test_SBInitError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_SBInitError */ +} void HS_AppInit_Test_TblInitError(void) { @@ -1117,8 +1095,7 @@ void HS_AppInit_Test_TblInitError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_TblInitError */ +} void HS_AppInit_Test_CustomInitError(void) { @@ -1175,8 +1152,7 @@ void HS_AppInit_Test_CustomInitError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppInit_Test_TblInitError */ +} void HS_SbInit_Test_Nominal(void) { @@ -1198,8 +1174,7 @@ void HS_SbInit_Test_Nominal(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_Nominal */ +} void HS_SbInit_Test_CreateSBCmdPipeError(void) { @@ -1236,8 +1211,7 @@ void HS_SbInit_Test_CreateSBCmdPipeError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_CreateSBCmdPipeError */ +} void HS_SbInit_Test_CreateSBEventPipeError(void) { @@ -1274,8 +1248,7 @@ void HS_SbInit_Test_CreateSBEventPipeError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_CreateSBEventPipeError */ +} void HS_SbInit_Test_CreateSBWakeupPipe(void) { @@ -1312,8 +1285,7 @@ void HS_SbInit_Test_CreateSBWakeupPipe(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_CreateSBWakeupPipe */ +} void HS_SbInit_Test_SubscribeHKRequestError(void) { @@ -1350,8 +1322,7 @@ void HS_SbInit_Test_SubscribeHKRequestError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_SubscribeHKRequestError */ +} void HS_SbInit_Test_SubscribeGndCmdsError(void) { @@ -1388,8 +1359,7 @@ void HS_SbInit_Test_SubscribeGndCmdsError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_SubscribeGndCmdsError */ +} void HS_SbInit_Test_SubscribeWakeupError(void) { @@ -1426,8 +1396,7 @@ void HS_SbInit_Test_SubscribeWakeupError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SbInit_Test_SubscribeWakeupError */ +} void HS_TblInit_Test_Nominal(void) { @@ -1446,8 +1415,7 @@ void HS_TblInit_Test_Nominal(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_Nominal */ +} void HS_TblInit_Test_RegisterAppMonTableError(void) { @@ -1480,8 +1448,7 @@ void HS_TblInit_Test_RegisterAppMonTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_RegisterAppMonTableError */ +} void HS_TblInit_Test_RegisterEventMonTableError(void) { @@ -1514,8 +1481,7 @@ void HS_TblInit_Test_RegisterEventMonTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_RegisterEventMonTableError */ +} void HS_TblInit_Test_RegisterMsgActsTableError(void) { @@ -1548,8 +1514,7 @@ void HS_TblInit_Test_RegisterMsgActsTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_RegisterMsgActsTableError */ +} #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_TblInit_Test_RegisterExeCountTableError(void) @@ -1583,8 +1548,7 @@ void HS_TblInit_Test_RegisterExeCountTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_RegisterExeCountTableError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1618,8 +1582,7 @@ void HS_TblInit_Test_LoadExeCountTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 6, "CFE_EVS_SendEvent was called %u time(s), expected 6", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_LoadExeCountTableError */ +} #endif void HS_TblInit_Test_LoadAppMonTableError(void) @@ -1665,8 +1628,7 @@ void HS_TblInit_Test_LoadAppMonTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_LoadAppMonTableError */ +} void HS_TblInit_Test_LoadEventMonTableError(void) { @@ -1711,8 +1673,7 @@ void HS_TblInit_Test_LoadEventMonTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_LoadEventMonTableError */ +} void HS_TblInit_Test_LoadMsgActsTableError(void) { @@ -1745,8 +1706,7 @@ void HS_TblInit_Test_LoadMsgActsTableError(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_TblInit_Test_LoadMsgActsTableError */ +} void HS_ProcessMain_Test(void) { @@ -1792,8 +1752,7 @@ void HS_ProcessMain_Test(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ProcessMain_Test */ +} void HS_ProcessMain_Test_MonStateDisabled(void) { @@ -1839,8 +1798,7 @@ void HS_ProcessMain_Test_MonStateDisabled(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ProcessMain_Test_MonStateDisabled */ +} void HS_ProcessMain_Test_AlivenessDisabled(void) { @@ -1885,8 +1843,7 @@ void HS_ProcessMain_Test_AlivenessDisabled(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ProcessMain_Test_AlivenessDisabled */ +} void HS_ProcessMain_Test_WatchdogDisabled(void) { @@ -1934,8 +1891,7 @@ void HS_ProcessMain_Test_WatchdogDisabled(void) UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ProcessMain_Test_WatchdogDisabled */ +} void HS_ProcessCommands_Test(void) { @@ -1969,10 +1925,10 @@ void HS_ProcessCommands_Test(void) UT_SetDefaultReturnValue(UT_KEY(CFE_SB_ReceiveBuffer), CFE_SUCCESS); UT_SetDeferredRetcode(UT_KEY(CFE_SB_ReceiveBuffer), 2, CFE_SB_NO_MESSAGE); UT_SetDeferredRetcode(UT_KEY(CFE_SB_ReceiveBuffer), 2, CFE_SB_NO_MESSAGE); - // UT_SetHookFunction(UT_KEY(CFE_SB_ReceiveBuffer), HS_APP_TEST_CFE_SB_RcvMsgHook, NULL); + /* UT_SetHookFunction(UT_KEY(CFE_SB_ReceiveBuffer), HS_APP_TEST_CFE_SB_RcvMsgHook, NULL); */ /* Causes check for non-null buffer pointer to succeed */ - // UT_SetDataBuffer(UT_KEY(CFE_SB_ReceiveBuffer), &Packet, sizeof(Packet), false); + /* UT_SetDataBuffer(UT_KEY(CFE_SB_ReceiveBuffer), &Packet, sizeof(Packet), false); */ /* Execute the function being tested */ Result = HS_ProcessCommands(); @@ -1996,8 +1952,7 @@ void HS_ProcessCommands_Test(void) call_count_HS_MonitorEvent); UtAssert_True(HS_AppData.CmdErrCount == 0, "HS_AppData.CmdErrCount == 0"); - -} /* end HS_ProcessCommands_Test */ +} void HS_ProcessCommands_Test_NullMsgPtr(void) { @@ -2041,8 +1996,7 @@ void HS_ProcessCommands_Test_NullMsgPtr(void) UtAssert_True(call_count_HS_AppPipe == 0, "HS_AppPipe was called %u time(s), expected 0", call_count_HS_AppPipe); UtAssert_True(HS_AppData.CmdErrCount == 0, "HS_AppData.CmdErrCount == 0"); - -} /* end HS_ProcessCommands_Test_NullMsgPtr */ +} /* * Register the test cases to execute with the unit test tool @@ -2131,9 +2085,4 @@ void UtTest_Setup(void) UtTest_Add(HS_ProcessCommands_Test, HS_Test_Setup, HS_Test_TearDown, "HS_ProcessCommands_Test"); UtTest_Add(HS_ProcessCommands_Test_NullMsgPtr, HS_Test_Setup, HS_Test_TearDown, "HS_ProcessCommands_Test_NullMsgPtr"); - -} /* end UtTest_Setup */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/unit-test/hs_cmds_tests.c b/unit-test/hs_cmds_tests.c index b25714f..b9ccc2f 100644 --- a/unit-test/hs_cmds_tests.c +++ b/unit-test/hs_cmds_tests.c @@ -80,8 +80,7 @@ void HS_AppPipe_Test_SendHK(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_SendHK */ +} void HS_AppPipe_Test_Noop(void) { @@ -108,8 +107,7 @@ void HS_AppPipe_Test_Noop(void) UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1); UtAssert_INT32_EQ(HS_AppData.CmdErrCount, 0); UtAssert_INT32_EQ(HS_AppData.CmdCount, 1); - -} /* end HS_AppPipe_Test_Noop */ +} void HS_AppPipe_Test_Reset(void) { @@ -135,8 +133,7 @@ void HS_AppPipe_Test_Reset(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_Reset */ +} void HS_AppPipe_Test_EnableAppMon(void) { @@ -167,8 +164,7 @@ void HS_AppPipe_Test_EnableAppMon(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_EnableAppMon */ +} void HS_AppPipe_Test_DisableAppMon(void) { @@ -197,8 +193,7 @@ void HS_AppPipe_Test_DisableAppMon(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_DisableAppMon */ +} void HS_AppPipe_Test_EnableEventMon(void) { @@ -227,8 +222,7 @@ void HS_AppPipe_Test_EnableEventMon(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_EnableEventMon */ +} void HS_AppPipe_Test_DisableEventMon(void) { @@ -257,8 +251,7 @@ void HS_AppPipe_Test_DisableEventMon(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_DisableEventMon */ +} void HS_AppPipe_Test_EnableAliveness(void) { @@ -284,8 +277,7 @@ void HS_AppPipe_Test_EnableAliveness(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_EnableAliveness */ +} void HS_AppPipe_Test_DisableAliveness(void) { @@ -311,8 +303,7 @@ void HS_AppPipe_Test_DisableAliveness(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_DisableAliveness */ +} void HS_AppPipe_Test_ResetResetsPerformed(void) { @@ -338,8 +329,7 @@ void HS_AppPipe_Test_ResetResetsPerformed(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_ResetResetsPerformed */ +} void HS_AppPipe_Test_SetMaxResets(void) { @@ -365,8 +355,7 @@ void HS_AppPipe_Test_SetMaxResets(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_SetMaxResets */ +} void HS_AppPipe_Test_EnableCPUHog(void) { @@ -392,8 +381,7 @@ void HS_AppPipe_Test_EnableCPUHog(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_EnableCPUHog */ +} void HS_AppPipe_Test_DisableCPUHog(void) { @@ -419,8 +407,7 @@ void HS_AppPipe_Test_DisableCPUHog(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_DisableCPUHog */ +} void HS_AppPipe_Test_InvalidCC(void) { @@ -462,8 +449,7 @@ void HS_AppPipe_Test_InvalidCC(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_InvalidCC */ +} void HS_AppPipe_Test_InvalidCCNoEvent(void) { @@ -490,8 +476,7 @@ void HS_AppPipe_Test_InvalidCCNoEvent(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_InvalidCCNoEvent */ +} void HS_AppPipe_Test_InvalidMID(void) { @@ -529,8 +514,7 @@ void HS_AppPipe_Test_InvalidMID(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppPipe_Test_InvalidMID */ +} void HS_HousekeepingReq_Test_InvalidEventMon(void) { @@ -609,8 +593,7 @@ void HS_HousekeepingReq_Test_InvalidEventMon(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_InvalidEventMon */ +} void HS_HousekeepingReq_Test_InvalidMsgLength(void) { @@ -624,8 +607,7 @@ void HS_HousekeepingReq_Test_InvalidMsgLength(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_InvalidMsgLength */ +} #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_HousekeepingReq_Test_AllFlagsEnabled(void) @@ -719,8 +701,7 @@ void HS_HousekeepingReq_Test_AllFlagsEnabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_AllFlagsEnabled */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -820,8 +801,7 @@ void HS_HousekeepingReq_Test_ResourceTypeAppMain(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeAppMain */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -920,8 +900,7 @@ void HS_HousekeepingReq_Test_ResourceTypeAppChild(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeAppChild */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1022,8 +1001,7 @@ void HS_HousekeepingReq_Test_ResourceTypeAppChildTaskIdError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeAppChildTaskIdError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1120,8 +1098,7 @@ void HS_HousekeepingReq_Test_ResourceTypeAppChildTaskInfoError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeAppChildTaskInfoError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1219,8 +1196,7 @@ void HS_HousekeepingReq_Test_ResourceTypeDevice(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeDevice */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1311,8 +1287,7 @@ void HS_HousekeepingReq_Test_ResourceTypeISR(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeISR */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1406,8 +1381,7 @@ void HS_HousekeepingReq_Test_ResourceTypeISRGenCounterError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_ResourceTypeISRGenCounterError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -1503,8 +1477,7 @@ void HS_HousekeepingReq_Test_ResourceTypeUnknown(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 32, "CFE_EVS_SendEvent was called %u time(s), expected 32", call_count_CFE_EVS_SendEvent); - -} /* end HS_HousekeepingReq_Test_AllFlagsEnabled */ +} #endif void HS_Noop_Test(void) @@ -1543,8 +1516,7 @@ void HS_Noop_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_Noop_Test */ +} void HS_Noop_Test_MsgLengthError(void) { @@ -1571,8 +1543,7 @@ void HS_Noop_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_Noop_Test_MsgLengthError */ +} void HS_ResetCmd_Test(void) { @@ -1610,8 +1581,7 @@ void HS_ResetCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ResetCmd_Test */ +} void HS_ResetCmd_Test_MsgLengthError(void) { @@ -1638,8 +1608,7 @@ void HS_ResetCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ResetCmd_Test_MsgLengthError */ +} void HS_ResetCounters_Test(void) { @@ -1660,8 +1629,7 @@ void HS_ResetCounters_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ResetCounters_Test */ +} void HS_EnableAppMonCmd_Test(void) { @@ -1707,8 +1675,7 @@ void HS_EnableAppMonCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableAppMonCmd_Test */ +} void HS_EnableAppMonCmd_Test_MsgLengthError(void) { @@ -1743,8 +1710,7 @@ void HS_EnableAppMonCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableAppMonCmd_Test_MsgLengthError */ +} void HS_DisableAppMonCmd_Test(void) { @@ -1785,8 +1751,7 @@ void HS_DisableAppMonCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableAppMonCmd_Test */ +} void HS_DisableAppMonCmd_Test_MsgLengthError(void) { @@ -1818,8 +1783,7 @@ void HS_DisableAppMonCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableAppMonCmd_Test_MsgLengthError */ +} void HS_EnableEventMonCmd_Test_Disabled(void) { @@ -1862,8 +1826,7 @@ void HS_EnableEventMonCmd_Test_Disabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableEventMonCmd_Test_Disabled */ +} void HS_EnableEventMonCmd_Test_DisabledMsgLengthError(void) { @@ -1895,8 +1858,7 @@ void HS_EnableEventMonCmd_Test_DisabledMsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableEventMonCmd_Test_DisabledMsgLengthError */ +} void HS_EnableEventMonCmd_Test_AlreadyEnabled(void) { @@ -1939,8 +1901,7 @@ void HS_EnableEventMonCmd_Test_AlreadyEnabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableEventMonCmd_Test_AlreadyEnabled */ +} void HS_EnableEventMonCmd_Test_SubscribeLongError(void) { @@ -1986,8 +1947,7 @@ void HS_EnableEventMonCmd_Test_SubscribeLongError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableEventMonCmd_Test_SubscribeLongError */ +} void HS_EnableEventMonCmd_Test_SubscribeShortError(void) { @@ -2033,8 +1993,7 @@ void HS_EnableEventMonCmd_Test_SubscribeShortError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableEventMonCmd_Test_SubscribeShortError */ +} void HS_DisableEventMonCmd_Test_Enabled(void) { @@ -2077,8 +2036,7 @@ void HS_DisableEventMonCmd_Test_Enabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableEventMonCmd_Test_Enabled */ +} void HS_DisableEventMonCmd_Test_AlreadyDisabled(void) { @@ -2121,8 +2079,7 @@ void HS_DisableEventMonCmd_Test_AlreadyDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableEventMonCmd_Test_AlreadyDisabled */ +} void HS_DisableEventMonCmd_Test_UnsubscribeLongError(void) { @@ -2168,8 +2125,7 @@ void HS_DisableEventMonCmd_Test_UnsubscribeLongError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableEventMonCmd_Test_UnsubscribeLongError */ +} void HS_DisableEventMonCmd_Test_UnsubscribeShortError(void) { @@ -2215,8 +2171,7 @@ void HS_DisableEventMonCmd_Test_UnsubscribeShortError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableEventMonCmd_Test_UnsubscribeShortError */ +} void HS_DisableEventMonCmd_Test_MsgLengthError(void) { @@ -2248,8 +2203,7 @@ void HS_DisableEventMonCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableEventMonCmd_Test_MsgLengthError */ +} void HS_EnableAlivenessCmd_Test(void) { @@ -2292,8 +2246,7 @@ void HS_EnableAlivenessCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableAlivenessCmd_Test */ +} void HS_EnableAlivenessCmd_Test_MsgLengthError(void) { @@ -2325,8 +2278,7 @@ void HS_EnableAlivenessCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableAlivenessCmd_Test_MsgLengthError */ +} void HS_DisableAlivenessCmd_Test(void) { @@ -2369,8 +2321,7 @@ void HS_DisableAlivenessCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableAlivenessCmd_Test */ +} void HS_DisableAlivenessCmd_Test_MsgLengthError(void) { @@ -2402,8 +2353,7 @@ void HS_DisableAlivenessCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableAlivenessCmd_Test_MsgLengthError */ +} void HS_EnableCPUHogCmd_Test(void) { @@ -2446,8 +2396,7 @@ void HS_EnableCPUHogCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableCPUHogCmd_Test */ +} void HS_EnableCPUHogCmd_Test_MsgLengthError(void) { @@ -2479,8 +2428,7 @@ void HS_EnableCPUHogCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_EnableCPUHogCmd_Test_MsgLengthError */ +} void HS_DisableCPUHogCmd_Test(void) { @@ -2523,8 +2471,7 @@ void HS_DisableCPUHogCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableCPUHogCmd_Test */ +} void HS_DisableCPUHogCmd_Test_MsgLengthError(void) { @@ -2556,8 +2503,7 @@ void HS_DisableCPUHogCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_DisableCPUHogCmd_Test_MsgLengthError */ +} void HS_ResetResetsPerformedCmd_Test(void) { @@ -2596,8 +2542,7 @@ void HS_ResetResetsPerformedCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ResetResetsPerformedCmd_Test */ +} void HS_ResetResetsPerformedCmd_Test_MsgLengthError(void) { @@ -2624,8 +2569,7 @@ void HS_ResetResetsPerformedCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_ResetResetsPerformedCmd_Test_MsgLengthError */ +} void HS_SetMaxResetsCmd_Test(void) { @@ -2666,8 +2610,7 @@ void HS_SetMaxResetsCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetMaxResetsCmd_Test */ +} void HS_SetMaxResetsCmd_Test_MsgLengthError(void) { @@ -2696,8 +2639,7 @@ void HS_SetMaxResetsCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetMaxResetsCmd_Test_MsgLengthError */ +} #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_AcquirePointers_Test_Nominal(void) @@ -2725,8 +2667,7 @@ void HS_AcquirePointers_Test_Nominal(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_Nominal */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2801,8 +2742,7 @@ void HS_AcquirePointers_Test_ErrorsWithAppMonLoadedAndEventMonLoadedEnabled(void call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 4, "CFE_EVS_SendEvent was called %u time(s), expected 4", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithAppMonLoadedAndEventMonLoadedEnabled */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2890,8 +2830,7 @@ void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabled2(v call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 5, "CFE_EVS_SendEvent was called %u time(s), expected 5", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabled */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2979,14 +2918,12 @@ void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabled(vo call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 5, "CFE_EVS_SendEvent was called %u time(s), expected 5", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabled */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoSubscribeError(void) { - HS_AppData.AppMonLoaded = HS_STATE_DISABLED; HS_AppData.EventMonLoaded = HS_STATE_DISABLED; HS_AppData.CurrentAppMonState = HS_STATE_ENABLED; @@ -3025,14 +2962,12 @@ void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoS call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 3, "CFE_EVS_SendEvent was called %u time(s), expected 3", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoSubscribeError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoSubscribeError2(void) { - HS_AppData.AppMonLoaded = HS_STATE_DISABLED; HS_AppData.EventMonLoaded = HS_STATE_DISABLED; HS_AppData.CurrentAppMonState = HS_STATE_ENABLED; @@ -3071,14 +3006,12 @@ void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoS call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 3, "CFE_EVS_SendEvent was called %u time(s), expected 3", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithCurrentAppMonAndCurrentEventMonEnabledNoSubscribeError */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonLoadedDisabledAndCurrentAppMonStateDisabled(void) { - HS_AppData.AppMonLoaded = HS_STATE_DISABLED; HS_AppData.EventMonLoaded = HS_STATE_DISABLED; HS_AppData.CurrentAppMonState = HS_STATE_DISABLED; @@ -3112,8 +3045,7 @@ void HS_AcquirePointers_Test_ErrorsWithCurrentAppMonLoadedDisabledAndCurrentAppM call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_AcquirePointers_Test_ErrorsWithCurrentAppMonLoadedDisabledAndCurrentAppMonStateDisabled */ +} #endif void HS_AppMonStatusRefresh_Test_CycleCountZero(void) @@ -3161,8 +3093,7 @@ void HS_AppMonStatusRefresh_Test_CycleCountZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMonStatusRefresh_Test_CycleCountZero */ +} void HS_AppMonStatusRefresh_Test_ActionTypeNOACT(void) { @@ -3210,8 +3141,7 @@ void HS_AppMonStatusRefresh_Test_ActionTypeNOACT(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMonStatusRefresh_Test_ActionTypeNOACT */ +} void HS_AppMonStatusRefresh_Test_ElseCase(void) { @@ -3262,8 +3192,7 @@ void HS_AppMonStatusRefresh_Test_ElseCase(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_AppMonStatusRefresh_Test_ElseCase */ +} void HS_MsgActsStatusRefresh_Test(void) { @@ -3291,8 +3220,7 @@ void HS_MsgActsStatusRefresh_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MsgActsStatusRefresh_Test */ +} /* * Register the test cases to execute with the unit test tool @@ -3431,9 +3359,4 @@ void UtTest_Setup(void) "HS_AppMonStatusRefresh_Test_ElseCase"); UtTest_Add(HS_MsgActsStatusRefresh_Test, HS_Test_Setup, HS_Test_TearDown, "HS_MsgActsStatusRefresh_Test"); - -} /* end UtTest_Setup */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/unit-test/hs_custom_tests.c b/unit-test/hs_custom_tests.c index 891bbb9..33ec3ad 100644 --- a/unit-test/hs_custom_tests.c +++ b/unit-test/hs_custom_tests.c @@ -67,8 +67,7 @@ void HS_IdleTask_Test(void) UtAssert_UINT32_EQ(HS_CustomData.ThisIdleTaskExec, 4); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); - -} /* end HS_IdleTask_Test */ +} void HS_CustomInit_Test_Nominal(void) { @@ -101,8 +100,7 @@ void HS_CustomInit_Test_Nominal(void) UtAssert_UINT32_EQ(HS_CustomData.UtilCallsPerMark, HS_UTIL_CALLS_PER_MARK); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); - -} /* end HS_CustomInit_Test_Nominal */ +} void HS_CustomInit_Test_CreateChildTaskError(void) { @@ -132,8 +130,7 @@ void HS_CustomInit_Test_CreateChildTaskError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomInit_Test_CreateChildTaskError */ +} void HS_CustomInit_Test_RegisterSynchCallbackError(void) { @@ -175,8 +172,7 @@ void HS_CustomInit_Test_RegisterSynchCallbackError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomInit_Test_RegisterSynchCallbackError */ +} void HS_CustomCleanup_Test(void) { @@ -191,8 +187,7 @@ void HS_CustomCleanup_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomCleanup_Test */ +} void HS_UtilizationIncrement_Test(void) { @@ -207,8 +202,7 @@ void HS_UtilizationIncrement_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_UtilizationIncrement_Test */ +} void HS_UtilizationMark_Test(void) { @@ -234,8 +228,7 @@ void HS_UtilizationMark_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_UtilizationMark_Test */ +} void HS_MarkIdleCallback_Test(void) { @@ -248,8 +241,7 @@ void HS_MarkIdleCallback_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MarkIdleCallback_Test */ +} void HS_CustomMonitorUtilization_Test(void) { @@ -268,8 +260,7 @@ void HS_CustomMonitorUtilization_Test(void) UtAssert_UINT32_EQ(HS_CustomData.UtilCycleCounter, 0); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); - -} /* end HS_CustomMonitorUtilization_Test */ +} void HS_CustomCommands_Test_UtilDiagReport(void) { @@ -298,8 +289,7 @@ void HS_CustomCommands_Test_UtilDiagReport(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomCommands_Test_UtilDiagReport */ +} void HS_CustomCommands_Test_SetUtilParamsCmd(void) { @@ -328,8 +318,7 @@ void HS_CustomCommands_Test_SetUtilParamsCmd(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomCommands_Test_SetUtilParamsCmd */ +} void HS_CustomCommands_Test_SetUtilDiagCmd(void) { @@ -358,8 +347,7 @@ void HS_CustomCommands_Test_SetUtilDiagCmd(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomCommands_Test_SetUtilDiagCmd */ +} void HS_CustomCommands_Test_InvalidCommandCode(void) { @@ -384,8 +372,7 @@ void HS_CustomCommands_Test_InvalidCommandCode(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomCommands_Test_InvalidCommandCode */ +} void HS_UtilDiagReport_Test(void) { @@ -421,12 +408,10 @@ void HS_UtilDiagReport_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_UtilDiagReport_Test */ +} void HS_UtilDiagReport_Test_Loops(void) { - /* ensure all values produce unique time jumps */ HS_CustomData.UtilArray[0] = 0xFFFFFFFE; HS_CustomData.UtilArray[1] = 0x00000111; @@ -457,8 +442,7 @@ void HS_UtilDiagReport_Test_Loops(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_UtilDiagReport_Test_Loops */ +} void HS_CustomGetUtil_Test(void) { @@ -478,8 +462,7 @@ void HS_CustomGetUtil_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomGetUtil_Test */ +} void HS_CustomGetUtil_Test_DivZero(void) { @@ -501,8 +484,7 @@ void HS_CustomGetUtil_Test_DivZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_CustomGetUtil_Test_DivZero */ +} void HS_SetUtilParamsCmd_Test_Nominal(void) { @@ -548,8 +530,7 @@ void HS_SetUtilParamsCmd_Test_Nominal(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilParamsCmd_Test_Nominal */ +} void HS_SetUtilParamsCmd_Test_NominalMultZero(void) { @@ -595,8 +576,7 @@ void HS_SetUtilParamsCmd_Test_NominalMultZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilParamsCmd_Test_NominalMultZero */ +} void HS_SetUtilParamsCmd_Test_NominalDivZero(void) { @@ -642,8 +622,7 @@ void HS_SetUtilParamsCmd_Test_NominalDivZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilParamsCmd_Test_NominalDivZero */ +} void HS_SetUtilParamsCmd_Test_Error(void) { @@ -686,8 +665,7 @@ void HS_SetUtilParamsCmd_Test_Error(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilParamsCmd_Test_Error */ +} void HS_SetUtilParamsCmd_Test_MsgLengthError(void) { @@ -721,8 +699,7 @@ void HS_SetUtilParamsCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilParamsCmd_Test_MsgLengthError */ +} void HS_SetUtilDiagCmd_Test(void) { @@ -764,8 +741,7 @@ void HS_SetUtilDiagCmd_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilDiagCmd_Test */ +} void HS_SetUtilDiagCmd_Test_MsgLengthError(void) { @@ -794,8 +770,7 @@ void HS_SetUtilDiagCmd_Test_MsgLengthError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetUtilDiagCmd_Test_MsgLengthError */ +} /* * Register the test cases to execute with the unit test tool @@ -847,9 +822,4 @@ void UtTest_Setup(void) UtTest_Add(HS_SetUtilDiagCmd_Test, HS_Test_Setup, HS_Test_TearDown, "HS_SetUtilDiagCmd_Test"); UtTest_Add(HS_SetUtilDiagCmd_Test_MsgLengthError, HS_Test_Setup, HS_Test_TearDown, "HS_SetUtilDiagCmd_Test_MsgLengthError"); - -} /* end UtTest_Setup */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/unit-test/hs_monitors_tests.c b/unit-test/hs_monitors_tests.c index 696b77e..a449676 100644 --- a/unit-test/hs_monitors_tests.c +++ b/unit-test/hs_monitors_tests.c @@ -92,8 +92,7 @@ void HS_MonitorApplications_Test_AppNameNotFound(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_AppNameNotFound */ +} void HS_MonitorApplications_Test_AppNameNotFoundDebugEvent(void) { @@ -122,8 +121,7 @@ void HS_MonitorApplications_Test_AppNameNotFoundDebugEvent(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_AppNameNotFoundDebugEvent */ +} void HS_MonitorApplications_Test_GetExeCountFailure(void) { @@ -158,8 +156,7 @@ void HS_MonitorApplications_Test_GetExeCountFailure(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_GetExeCountFailure */ +} void HS_MonitorApplications_Test_ProcessorResetError(void) { @@ -219,8 +216,7 @@ void HS_MonitorApplications_Test_ProcessorResetError(void) strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH); UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); - -} /* end HS_MonitorApplications_Test_ProcessorResetError */ +} void HS_MonitorApplications_Test_ProcessorResetActionLimitError(void) { @@ -280,8 +276,7 @@ void HS_MonitorApplications_Test_ProcessorResetActionLimitError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_ProcessorResetActionLimitError */ +} void HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoSuccess(void) { @@ -342,8 +337,7 @@ void HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoSuccess(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoSuccess */ +} void HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoNotSuccess(void) { @@ -400,8 +394,7 @@ void HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoNotSuccess(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_RestartAppErrorsGetAppInfoNotSuccess */ +} void HS_MonitorApplications_Test_RestartAppRestartSuccess(void) { @@ -438,8 +431,7 @@ void HS_MonitorApplications_Test_RestartAppRestartSuccess(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_RestartAppRestartSuccess */ +} void HS_MonitorApplications_Test_FailError(void) { @@ -486,8 +478,7 @@ void HS_MonitorApplications_Test_FailError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_FailError */ +} void HS_MonitorApplications_Test_MsgActsNOACT(void) { @@ -534,8 +525,7 @@ void HS_MonitorApplications_Test_MsgActsNOACT(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsNOACT */ +} void HS_MonitorApplications_Test_MsgActsNOACTDisabled(void) { @@ -582,8 +572,7 @@ void HS_MonitorApplications_Test_MsgActsNOACTDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsNOACTDisabled */ +} void HS_MonitorApplications_Test_MsgActsErrorDefault(void) { @@ -647,8 +636,7 @@ void HS_MonitorApplications_Test_MsgActsErrorDefault(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsErrorDefault */ +} void HS_MonitorApplications_Test_MsgActsErrorDisabled(void) { @@ -699,8 +687,7 @@ void HS_MonitorApplications_Test_MsgActsErrorDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsErrorDisabled */ +} void HS_MonitorApplications_Test_MsgActsErrorDefaultCoolDown(void) { @@ -751,8 +738,7 @@ void HS_MonitorApplications_Test_MsgActsErrorDefaultCoolDown(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsErrorDefaultCoolDown */ +} void HS_MonitorApplications_Test_MsgActsErrorDefaultDisabled(void) { @@ -803,8 +789,7 @@ void HS_MonitorApplications_Test_MsgActsErrorDefaultDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsErrorDefaultDisabled */ +} void HS_MonitorApplications_Test_MsgActsErrorDefaultNoEvent(void) { @@ -855,8 +840,7 @@ void HS_MonitorApplications_Test_MsgActsErrorDefaultNoEvent(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_Test_MsgActsErrorNoEvent */ +} void HS_MonitorApplications_CheckInCountdownNotZero(void) { @@ -890,8 +874,7 @@ void HS_MonitorApplications_CheckInCountdownNotZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorApplications_CheckInCountdownNotZero */ +} void HS_MonitorEvent_Test_AppName(void) { @@ -930,8 +913,7 @@ void HS_MonitorEvent_Test_AppName(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_AppName */ +} void HS_MonitorEvent_Test_ProcErrorReset(void) { @@ -989,8 +971,7 @@ void HS_MonitorEvent_Test_ProcErrorReset(void) UtAssert_True(HS_AppData.ServiceWatchdogFlag == HS_STATE_DISABLED, "HS_AppData.ServiceWatchdogFlag == HS_STATE_DISABLED"); - -} /* end HS_MonitorEvent_Test_ProcErrorReset */ +} void HS_MonitorEvent_Test_ProcErrorNoReset(void) { @@ -1048,8 +1029,7 @@ void HS_MonitorEvent_Test_ProcErrorNoReset(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_ProcErrorNoReset */ +} void HS_MonitorEvent_Test_AppRestartErrors(void) { @@ -1108,8 +1088,7 @@ void HS_MonitorEvent_Test_AppRestartErrors(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_AppRestartErrors */ +} void HS_MonitorEvent_Test_OnlySecondAppRestartError(void) { @@ -1158,8 +1137,7 @@ void HS_MonitorEvent_Test_OnlySecondAppRestartError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_OnlySecondAppRestartError */ +} void HS_MonitorEvent_Test_NoSecondAppRestartError(void) { @@ -1208,8 +1186,7 @@ void HS_MonitorEvent_Test_NoSecondAppRestartError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_NoSecondAppRestartError */ +} void HS_MonitorEvent_Test_DeleteErrors(void) { @@ -1268,8 +1245,7 @@ void HS_MonitorEvent_Test_DeleteErrors(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_DeleteErrors */ +} void HS_MonitorEvent_Test_OnlySecondDeleteError(void) { @@ -1318,8 +1294,7 @@ void HS_MonitorEvent_Test_OnlySecondDeleteError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_OnlySecondDeleteError */ +} void HS_MonitorEvent_Test_NoSecondDeleteError(void) { @@ -1368,8 +1343,7 @@ void HS_MonitorEvent_Test_NoSecondDeleteError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_NoSecondDeleteError */ +} void HS_MonitorEvent_Test_MsgActsError(void) { @@ -1426,8 +1400,7 @@ void HS_MonitorEvent_Test_MsgActsError(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsError */ +} void HS_MonitorEvent_Test_MsgActsErrorNoEvent(void) { @@ -1470,8 +1443,7 @@ void HS_MonitorEvent_Test_MsgActsErrorNoEvent(void) /* Verify results */ UtAssert_True(HS_AppData.MsgActExec == 1, "HS_AppData.MsgActExec == 1"); UtAssert_True(HS_AppData.MsgActCooldown[0] == 5, "HS_AppData.MsgActCooldown[0] == 5"); - -} /* end HS_MonitorEvent_Test_MsgActsErrorNoEvent */ +} void HS_MonitorEvent_Test_MsgActsDefaultDisabled(void) { @@ -1510,8 +1482,7 @@ void HS_MonitorEvent_Test_MsgActsDefaultDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsDefaultDisabled */ +} void HS_MonitorEvent_Test_MsgActsDefaultGreaterLastNonMsg(void) { @@ -1550,8 +1521,7 @@ void HS_MonitorEvent_Test_MsgActsDefaultGreaterLastNonMsg(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsDefaultGreaterLastNonMsg */ +} void HS_MonitorEvent_Test_MsgActsDefaultLessMaxActTypes(void) { @@ -1587,8 +1557,7 @@ void HS_MonitorEvent_Test_MsgActsDefaultLessMaxActTypes(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsDefaultLessMaxActTypes */ +} void HS_MonitorEvent_Test_MsgActsDefaultMaxActTypes(void) { @@ -1626,8 +1595,7 @@ void HS_MonitorEvent_Test_MsgActsDefaultMaxActTypes(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsDefaultMaxActTypes */ +} void HS_MonitorEvent_Test_MsgActsCoolDown(void) { @@ -1668,8 +1636,7 @@ void HS_MonitorEvent_Test_MsgActsCoolDown(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsCoolDown */ +} void HS_MonitorEvent_Test_MsgActsMATDisabled(void) { @@ -1710,8 +1677,7 @@ void HS_MonitorEvent_Test_MsgActsMATDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorEvent_Test_MsgActsMATDisabled */ +} void HS_MonitorUtilization_Test_HighCurrentUtil(void) { @@ -1737,8 +1703,7 @@ void HS_MonitorUtilization_Test_HighCurrentUtil(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorUtilization_Test_HighCurrentUtil */ +} void HS_MonitorUtilization_Test_CurrentUtilLessThanZero(void) { @@ -1760,8 +1725,7 @@ void HS_MonitorUtilization_Test_CurrentUtilLessThanZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorUtilization_Test_CurrentUtilLessThanZero */ +} void HS_MonitorUtilization_Test_CPUHogging(void) { @@ -1807,12 +1771,10 @@ void HS_MonitorUtilization_Test_CPUHogging(void) UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec); /* For this test case, we don't care about any variables changed after this message */ - -} /* end HS_MonitorUtilization_Test_CPUHogging */ +} void HS_MonitorUtilization_Test_CPUHoggingNotMax(void) { - HS_CustomData.LastIdleTaskInterval = 0; HS_CustomData.UtilMult1 = 1; HS_CustomData.UtilMult2 = 1; @@ -1836,8 +1798,7 @@ void HS_MonitorUtilization_Test_CPUHoggingNotMax(void) call_count_CFE_EVS_SendEvent); /* For this test case, we don't care about any variables changed after this message */ - -} /* end HS_MonitorUtilization_Test_CPUHoggingNotMax */ +} void HS_MonitorUtilization_Test_CurrentCPUHogStateDisabled(void) { @@ -1864,8 +1825,7 @@ void HS_MonitorUtilization_Test_CurrentCPUHogStateDisabled(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorUtilization_Test_CurrentCPUHogStateDisabled */ +} void HS_MonitorUtilization_Test_HighUtilIndex(void) { @@ -1894,8 +1854,7 @@ void HS_MonitorUtilization_Test_HighUtilIndex(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorUtilization_Test_HighUtilIndex */ +} void HS_MonitorUtilization_Test_LowUtilIndex(void) { @@ -1924,8 +1883,7 @@ void HS_MonitorUtilization_Test_LowUtilIndex(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_MonitorUtilization_Test_LowUtilIndex */ +} void HS_ValidateAMTable_Test_UnusedTableEntryCycleCountZero(void) { @@ -1966,8 +1924,7 @@ void HS_ValidateAMTable_Test_UnusedTableEntryCycleCountZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateAMTable_Test_UnusedTableEntryCycleCountZero */ +} void HS_ValidateAMTable_Test_UnusedTableEntryActionTypeNOACT(void) { @@ -2008,8 +1965,7 @@ void HS_ValidateAMTable_Test_UnusedTableEntryActionTypeNOACT(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateAMTable_Test_UnusedTableEntryActionTypeNOACT */ +} void HS_ValidateAMTable_Test_BufferNotNull(void) { @@ -2062,8 +2018,7 @@ void HS_ValidateAMTable_Test_BufferNotNull(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateAMTable_Test_BufferNotNull */ +} void HS_ValidateAMTable_Test_ActionTypeNotValid(void) { @@ -2116,8 +2071,7 @@ void HS_ValidateAMTable_Test_ActionTypeNotValid(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateAMTable_Test_ActionTypeNotValid */ +} void HS_ValidateAMTable_Test_EntryGood(void) { @@ -2162,8 +2116,7 @@ void HS_ValidateAMTable_Test_EntryGood(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateAMTable_Test_EntryGood */ +} void HS_ValidateAMTable_Test_Null(void) { @@ -2222,8 +2175,7 @@ void HS_ValidateEMTable_Test_UnusedTableEntryEventIDZero(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateEMTable_Test_UnusedTableEntryEventIDZero */ +} void HS_ValidateEMTable_Test_UnusedTableEntryActionTypeNOACT(void) { @@ -2264,8 +2216,7 @@ void HS_ValidateEMTable_Test_UnusedTableEntryActionTypeNOACT(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateEMTable_Test_UnusedTableEntryActionTypeNOACT */ +} void HS_ValidateEMTable_Test_BufferNotNull(void) { @@ -2318,8 +2269,7 @@ void HS_ValidateEMTable_Test_BufferNotNull(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateEMTable_Test_BufferNotNull */ +} void HS_ValidateEMTable_Test_ActionTypeNotValid(void) { @@ -2372,8 +2322,7 @@ void HS_ValidateEMTable_Test_ActionTypeNotValid(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateEMTable_Test_ActionTypeNotValid */ +} void HS_ValidateEMTable_Test_EntryGood(void) { @@ -2418,8 +2367,7 @@ void HS_ValidateEMTable_Test_EntryGood(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateEMTable_Test_EntryGood */ +} void HS_ValidateEMTable_Test_Null(void) { @@ -2488,8 +2436,7 @@ void HS_ValidateXCTable_Test_UnusedTableEntry(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateXCTable_Test_UnusedTableEntry */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2543,8 +2490,7 @@ void HS_ValidateXCTable_Test_BufferNotNull(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateXCTable_Test_BufferNotNull */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2604,8 +2550,7 @@ void HS_ValidateXCTable_Test_ResourceTypeNotValid(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateXCTable_Test_ResourceTypeNotValid */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2647,8 +2592,7 @@ void HS_ValidateXCTable_Test_EntryGood(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateXCTable_Test_EntryGood */ +} #endif #if HS_MAX_EXEC_CNT_SLOTS != 0 @@ -2729,8 +2673,7 @@ void HS_ValidateMATable_Test_UnusedTableEntry(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateMATable_Test_UnusedTableEntry */ +} void HS_ValidateMATable_Test_InvalidEnableState(void) { @@ -2787,8 +2730,7 @@ void HS_ValidateMATable_Test_InvalidEnableState(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateMATable_Test_InvalidEnableState */ +} void HS_ValidateMATable_Test_MessageIDTooHigh(void) { @@ -2845,8 +2787,7 @@ void HS_ValidateMATable_Test_MessageIDTooHigh(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateMATable_Test_MessageIDTooHigh */ +} void HS_ValidateMATable_Test_LengthTooHigh(void) { @@ -2903,8 +2844,7 @@ void HS_ValidateMATable_Test_LengthTooHigh(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 2, "CFE_EVS_SendEvent was called %u time(s), expected 2", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateMATable_Test_LengthTooHigh */ +} void HS_ValidateMATable_Test_EntryGood(void) { @@ -2951,8 +2891,7 @@ void HS_ValidateMATable_Test_EntryGood(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_ValidateMATable_Test_EntryGood */ +} void HS_ValidateMATable_Test_Null(void) { @@ -3003,8 +2942,7 @@ void HS_SetCDSData_Test(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_SetCDSData_Test */ +} /* * Register the test cases to execute with the unit test tool @@ -3138,9 +3076,4 @@ void UtTest_Setup(void) UtTest_Add(HS_ValidateMATable_Test_Null, HS_Test_Setup, HS_Test_TearDown, "HS_ValidateMATable_Test_Null"); UtTest_Add(HS_SetCDSData_Test, HS_Test_Setup, HS_Test_TearDown, "HS_SetCDSData_Test"); - -} /* end UtTest_Setup */ - -/************************/ -/* End of File Comment */ -/************************/ +} diff --git a/unit-test/hs_utils_tests.c b/unit-test/hs_utils_tests.c index 26feab2..69990ba 100644 --- a/unit-test/hs_utils_tests.c +++ b/unit-test/hs_utils_tests.c @@ -68,8 +68,7 @@ void HS_VerifyMsgLength_Test_Nominal(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0", call_count_CFE_EVS_SendEvent); - -} /* end HS_VerifyMsgLength_Test_Nominal */ +} void HS_VerifyMsgLength_Test_LengthErrorHK(void) { @@ -110,8 +109,7 @@ void HS_VerifyMsgLength_Test_LengthErrorHK(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_VerifyMsgLength_Test_LengthErrorHK */ +} void HS_VerifyMsgLength_Test_LengthErrorNonHK(void) { @@ -154,8 +152,7 @@ void HS_VerifyMsgLength_Test_LengthErrorNonHK(void) call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent)); UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1", call_count_CFE_EVS_SendEvent); - -} /* end HS_VerifyMsgLength_Test_LengthErrorNonHK */ +} void HS_AMTActionIsValid_Valid(void) {