Skip to content

Commit

Permalink
Fix nasa#84, Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tvisha Andharia committed Dec 10, 2024
1 parent be76457 commit 2212070
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 80 deletions.
2 changes: 1 addition & 1 deletion fsw/src/sc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SC_AbsTimeTag_t SC_GetAtsEntryTime(SC_AtsEntryHeader_t *Entry);
*
* \return The absolute time tag
*/
SC_AbsTimeTag_t SC_ComputeAbsTime(SC_RelTimeTag_t RelTime);
SC_AbsTimeTag_t SC_ComputeAbsTime(uint32 RelTime);

/**
* \brief Computes an absolute wakeup count from a relative wakeup count
Expand Down
34 changes: 22 additions & 12 deletions unit-test/stubs/sc_app_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
* Generated stub function for SC_AppInit()
* ----------------------------------------------------
*/
CFE_Status_t SC_AppInit(void) {
CFE_Status_t SC_AppInit(void)
{
UT_GenStub_SetupReturnBuffer(SC_AppInit, CFE_Status_t);

UT_GenStub_Execute(SC_AppInit, Basic, NULL);
Expand All @@ -44,14 +45,18 @@ CFE_Status_t SC_AppInit(void) {
* Generated stub function for SC_AppMain()
* ----------------------------------------------------
*/
void SC_AppMain(void) { UT_GenStub_Execute(SC_AppMain, Basic, NULL); }
void SC_AppMain(void)
{
UT_GenStub_Execute(SC_AppMain, Basic, NULL);
}

/*
* ----------------------------------------------------
* Generated stub function for SC_GetDumpTablePointers()
* ----------------------------------------------------
*/
CFE_Status_t SC_GetDumpTablePointers(void) {
CFE_Status_t SC_GetDumpTablePointers(void)
{
UT_GenStub_SetupReturnBuffer(SC_GetDumpTablePointers, CFE_Status_t);

UT_GenStub_Execute(SC_GetDumpTablePointers, Basic, NULL);
Expand All @@ -64,7 +69,8 @@ CFE_Status_t SC_GetDumpTablePointers(void) {
* Generated stub function for SC_GetLoadTablePointers()
* ----------------------------------------------------
*/
CFE_Status_t SC_GetLoadTablePointers(void) {
CFE_Status_t SC_GetLoadTablePointers(void)
{
UT_GenStub_SetupReturnBuffer(SC_GetLoadTablePointers, CFE_Status_t);

UT_GenStub_Execute(SC_GetLoadTablePointers, Basic, NULL);
Expand All @@ -77,7 +83,8 @@ CFE_Status_t SC_GetLoadTablePointers(void) {
* Generated stub function for SC_InitTables()
* ----------------------------------------------------
*/
CFE_Status_t SC_InitTables(void) {
CFE_Status_t SC_InitTables(void)
{
UT_GenStub_SetupReturnBuffer(SC_InitTables, CFE_Status_t);

UT_GenStub_Execute(SC_InitTables, Basic, NULL);
Expand All @@ -90,8 +97,8 @@ CFE_Status_t SC_InitTables(void) {
* Generated stub function for SC_LoadDefaultTables()
* ----------------------------------------------------
*/
void SC_LoadDefaultTables(void) {

void SC_LoadDefaultTables(void)
{
UT_GenStub_Execute(SC_LoadDefaultTables, Basic, NULL);
}

Expand All @@ -100,7 +107,8 @@ void SC_LoadDefaultTables(void) {
* Generated stub function for SC_RegisterAllTables()
* ----------------------------------------------------
*/
CFE_Status_t SC_RegisterAllTables(void) {
CFE_Status_t SC_RegisterAllTables(void)
{
UT_GenStub_SetupReturnBuffer(SC_RegisterAllTables, CFE_Status_t);

UT_GenStub_Execute(SC_RegisterAllTables, Basic, NULL);
Expand All @@ -113,7 +121,8 @@ CFE_Status_t SC_RegisterAllTables(void) {
* Generated stub function for SC_RegisterDumpOnlyTables()
* ----------------------------------------------------
*/
CFE_Status_t SC_RegisterDumpOnlyTables(void) {
CFE_Status_t SC_RegisterDumpOnlyTables(void)
{
UT_GenStub_SetupReturnBuffer(SC_RegisterDumpOnlyTables, CFE_Status_t);

UT_GenStub_Execute(SC_RegisterDumpOnlyTables, Basic, NULL);
Expand All @@ -126,7 +135,8 @@ CFE_Status_t SC_RegisterDumpOnlyTables(void) {
* Generated stub function for SC_RegisterLoadableTables()
* ----------------------------------------------------
*/
CFE_Status_t SC_RegisterLoadableTables(void) {
CFE_Status_t SC_RegisterLoadableTables(void)
{
UT_GenStub_SetupReturnBuffer(SC_RegisterLoadableTables, CFE_Status_t);

UT_GenStub_Execute(SC_RegisterLoadableTables, Basic, NULL);
Expand All @@ -139,7 +149,7 @@ CFE_Status_t SC_RegisterLoadableTables(void) {
* Generated stub function for SC_RegisterManageCmds()
* ----------------------------------------------------
*/
void SC_RegisterManageCmds(void) {

void SC_RegisterManageCmds(void)
{
UT_GenStub_Execute(SC_RegisterManageCmds, Basic, NULL);
}
33 changes: 22 additions & 11 deletions unit-test/stubs/sc_atsrq_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
* Generated stub function for SC_AppendAtsCmd()
* ----------------------------------------------------
*/
void SC_AppendAtsCmd(const SC_AppendAtsCmd_t *Cmd) {
void SC_AppendAtsCmd(const SC_AppendAtsCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_AppendAtsCmd, const SC_AppendAtsCmd_t *, Cmd);

UT_GenStub_Execute(SC_AppendAtsCmd, Basic, NULL);
Expand All @@ -42,7 +43,8 @@ void SC_AppendAtsCmd(const SC_AppendAtsCmd_t *Cmd) {
* Generated stub function for SC_BeginAts()
* ----------------------------------------------------
*/
bool SC_BeginAts(SC_AtsIndex_t AtsIndex, uint16 TimeOffset) {
bool SC_BeginAts(SC_AtsIndex_t AtsIndex, uint16 TimeOffset)
{
UT_GenStub_SetupReturnBuffer(SC_BeginAts, bool);

UT_GenStub_AddParam(SC_BeginAts, SC_AtsIndex_t, AtsIndex);
Expand All @@ -58,7 +60,8 @@ bool SC_BeginAts(SC_AtsIndex_t AtsIndex, uint16 TimeOffset) {
* Generated stub function for SC_ContinueAtsOnFailureCmd()
* ----------------------------------------------------
*/
void SC_ContinueAtsOnFailureCmd(const SC_ContinueAtsOnFailureCmd_t *Cmd) {
void SC_ContinueAtsOnFailureCmd(const SC_ContinueAtsOnFailureCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_ContinueAtsOnFailureCmd,
const SC_ContinueAtsOnFailureCmd_t *, Cmd);

Expand All @@ -70,7 +73,8 @@ void SC_ContinueAtsOnFailureCmd(const SC_ContinueAtsOnFailureCmd_t *Cmd) {
* Generated stub function for SC_InlineSwitch()
* ----------------------------------------------------
*/
bool SC_InlineSwitch(void) {
bool SC_InlineSwitch(void)
{
UT_GenStub_SetupReturnBuffer(SC_InlineSwitch, bool);

UT_GenStub_Execute(SC_InlineSwitch, Basic, NULL);
Expand All @@ -83,7 +87,8 @@ bool SC_InlineSwitch(void) {
* Generated stub function for SC_JumpAtsCmd()
* ----------------------------------------------------
*/
void SC_JumpAtsCmd(const SC_JumpAtsCmd_t *Cmd) {
void SC_JumpAtsCmd(const SC_JumpAtsCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_JumpAtsCmd, const SC_JumpAtsCmd_t *, Cmd);

UT_GenStub_Execute(SC_JumpAtsCmd, Basic, NULL);
Expand All @@ -94,15 +99,18 @@ void SC_JumpAtsCmd(const SC_JumpAtsCmd_t *Cmd) {
* Generated stub function for SC_KillAts()
* ----------------------------------------------------
*/
void SC_KillAts(void) { UT_GenStub_Execute(SC_KillAts, Basic, NULL); }
void SC_KillAts(void)
{
UT_GenStub_Execute(SC_KillAts, Basic, NULL);
}

/*
* ----------------------------------------------------
* Generated stub function for SC_ServiceSwitchPend()
* ----------------------------------------------------
*/
void SC_ServiceSwitchPend(void) {

void SC_ServiceSwitchPend(void)
{
UT_GenStub_Execute(SC_ServiceSwitchPend, Basic, NULL);
}

Expand All @@ -111,7 +119,8 @@ void SC_ServiceSwitchPend(void) {
* Generated stub function for SC_StartAtsCmd()
* ----------------------------------------------------
*/
void SC_StartAtsCmd(const SC_StartAtsCmd_t *Cmd) {
void SC_StartAtsCmd(const SC_StartAtsCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_StartAtsCmd, const SC_StartAtsCmd_t *, Cmd);

UT_GenStub_Execute(SC_StartAtsCmd, Basic, NULL);
Expand All @@ -122,7 +131,8 @@ void SC_StartAtsCmd(const SC_StartAtsCmd_t *Cmd) {
* Generated stub function for SC_StopAtsCmd()
* ----------------------------------------------------
*/
void SC_StopAtsCmd(const SC_StopAtsCmd_t *Cmd) {
void SC_StopAtsCmd(const SC_StopAtsCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_StopAtsCmd, const SC_StopAtsCmd_t *, Cmd);

UT_GenStub_Execute(SC_StopAtsCmd, Basic, NULL);
Expand All @@ -133,7 +143,8 @@ void SC_StopAtsCmd(const SC_StopAtsCmd_t *Cmd) {
* Generated stub function for SC_SwitchAtsCmd()
* ----------------------------------------------------
*/
void SC_SwitchAtsCmd(const SC_SwitchAtsCmd_t *Cmd) {
void SC_SwitchAtsCmd(const SC_SwitchAtsCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_SwitchAtsCmd, const SC_SwitchAtsCmd_t *, Cmd);

UT_GenStub_Execute(SC_SwitchAtsCmd, Basic, NULL);
Expand Down
37 changes: 24 additions & 13 deletions unit-test/stubs/sc_cmds_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
* Generated stub function for SC_ManageAtsTable()
* ----------------------------------------------------
*/
void SC_ManageAtsTable(int32 ArrayIndex) {
void SC_ManageAtsTable(int32 ArrayIndex)
{
UT_GenStub_AddParam(SC_ManageAtsTable, int32, ArrayIndex);

UT_GenStub_Execute(SC_ManageAtsTable, Basic, NULL);
Expand All @@ -42,7 +43,8 @@ void SC_ManageAtsTable(int32 ArrayIndex) {
* Generated stub function for SC_ManageRtsTable()
* ----------------------------------------------------
*/
void SC_ManageRtsTable(int32 ArrayIndex) {
void SC_ManageRtsTable(int32 ArrayIndex)
{
UT_GenStub_AddParam(SC_ManageRtsTable, int32, ArrayIndex);

UT_GenStub_Execute(SC_ManageRtsTable, Basic, NULL);
Expand All @@ -53,7 +55,8 @@ void SC_ManageRtsTable(int32 ArrayIndex) {
* Generated stub function for SC_ManageTable()
* ----------------------------------------------------
*/
void SC_ManageTable(SC_TableType type, int32 ArrayIndex) {
void SC_ManageTable(SC_TableType type, int32 ArrayIndex)
{
UT_GenStub_AddParam(SC_ManageTable, SC_TableType, type);
UT_GenStub_AddParam(SC_ManageTable, int32, ArrayIndex);

Expand All @@ -65,7 +68,8 @@ void SC_ManageTable(SC_TableType type, int32 ArrayIndex) {
* Generated stub function for SC_ManageTableCmd()
* ----------------------------------------------------
*/
void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd) {
void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_ManageTableCmd, const SC_ManageTableCmd_t *, Cmd);

UT_GenStub_Execute(SC_ManageTableCmd, Basic, NULL);
Expand All @@ -76,7 +80,8 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd) {
* Generated stub function for SC_NoopCmd()
* ----------------------------------------------------
*/
void SC_NoopCmd(const SC_NoopCmd_t *Cmd) {
void SC_NoopCmd(const SC_NoopCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_NoopCmd, const SC_NoopCmd_t *, Cmd);

UT_GenStub_Execute(SC_NoopCmd, Basic, NULL);
Expand All @@ -87,7 +92,8 @@ void SC_NoopCmd(const SC_NoopCmd_t *Cmd) {
* Generated stub function for SC_OneHzWakeupCmd()
* ----------------------------------------------------
*/
void SC_OneHzWakeupCmd(const SC_OneHzWakeupCmd_t *Cmd) {
void SC_OneHzWakeupCmd(const SC_OneHzWakeupCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_OneHzWakeupCmd, const SC_OneHzWakeupCmd_t *, Cmd);

UT_GenStub_Execute(SC_OneHzWakeupCmd, Basic, NULL);
Expand All @@ -98,8 +104,8 @@ void SC_OneHzWakeupCmd(const SC_OneHzWakeupCmd_t *Cmd) {
* Generated stub function for SC_ProcessAtpCmd()
* ----------------------------------------------------
*/
void SC_ProcessAtpCmd(void) {

void SC_ProcessAtpCmd(void)
{
UT_GenStub_Execute(SC_ProcessAtpCmd, Basic, NULL);
}

Expand All @@ -108,8 +114,8 @@ void SC_ProcessAtpCmd(void) {
* Generated stub function for SC_ProcessRtpCommand()
* ----------------------------------------------------
*/
void SC_ProcessRtpCommand(void) {

void SC_ProcessRtpCommand(void)
{
UT_GenStub_Execute(SC_ProcessRtpCommand, Basic, NULL);
}

Expand All @@ -118,7 +124,8 @@ void SC_ProcessRtpCommand(void) {
* Generated stub function for SC_ResetCountersCmd()
* ----------------------------------------------------
*/
void SC_ResetCountersCmd(const SC_ResetCountersCmd_t *Cmd) {
void SC_ResetCountersCmd(const SC_ResetCountersCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_ResetCountersCmd, const SC_ResetCountersCmd_t *, Cmd);

UT_GenStub_Execute(SC_ResetCountersCmd, Basic, NULL);
Expand All @@ -129,7 +136,8 @@ void SC_ResetCountersCmd(const SC_ResetCountersCmd_t *Cmd) {
* Generated stub function for SC_SendHkCmd()
* ----------------------------------------------------
*/
void SC_SendHkCmd(const SC_SendHkCmd_t *Cmd) {
void SC_SendHkCmd(const SC_SendHkCmd_t *Cmd)
{
UT_GenStub_AddParam(SC_SendHkCmd, const SC_SendHkCmd_t *, Cmd);

UT_GenStub_Execute(SC_SendHkCmd, Basic, NULL);
Expand All @@ -140,4 +148,7 @@ void SC_SendHkCmd(const SC_SendHkCmd_t *Cmd) {
* Generated stub function for SC_SendHkPacket()
* ----------------------------------------------------
*/
void SC_SendHkPacket(void) { UT_GenStub_Execute(SC_SendHkPacket, Basic, NULL); }
void SC_SendHkPacket(void)
{
UT_GenStub_Execute(SC_SendHkPacket, Basic, NULL);
}
9 changes: 6 additions & 3 deletions unit-test/stubs/sc_dispatch_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
* Generated stub function for SC_ProcessCommand()
* ----------------------------------------------------
*/
void SC_ProcessCommand(const CFE_SB_Buffer_t *BufPtr) {
void SC_ProcessCommand(const CFE_SB_Buffer_t *BufPtr)
{
UT_GenStub_AddParam(SC_ProcessCommand, const CFE_SB_Buffer_t *, BufPtr);

UT_GenStub_Execute(SC_ProcessCommand, Basic, NULL);
Expand All @@ -43,7 +44,8 @@ void SC_ProcessCommand(const CFE_SB_Buffer_t *BufPtr) {
* Generated stub function for SC_ProcessRequest()
* ----------------------------------------------------
*/
void SC_ProcessRequest(const CFE_SB_Buffer_t *BufPtr) {
void SC_ProcessRequest(const CFE_SB_Buffer_t *BufPtr)
{
UT_GenStub_AddParam(SC_ProcessRequest, const CFE_SB_Buffer_t *, BufPtr);

UT_GenStub_Execute(SC_ProcessRequest, Basic, NULL);
Expand All @@ -54,7 +56,8 @@ void SC_ProcessRequest(const CFE_SB_Buffer_t *BufPtr) {
* Generated stub function for SC_VerifyCmdLength()
* ----------------------------------------------------
*/
bool SC_VerifyCmdLength(const CFE_MSG_Message_t *Msg, size_t ExpectedLength) {
bool SC_VerifyCmdLength(const CFE_MSG_Message_t *Msg, size_t ExpectedLength)
{
UT_GenStub_SetupReturnBuffer(SC_VerifyCmdLength, bool);

UT_GenStub_AddParam(SC_VerifyCmdLength, const CFE_MSG_Message_t *, Msg);
Expand Down
Loading

0 comments on commit 2212070

Please sign in to comment.