Skip to content

Commit

Permalink
Update #778: Apply whitespace rules to new code
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Aug 11, 2020
1 parent f18a935 commit 4016605
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 22 deletions.
1 change: 1 addition & 0 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ function(add_unit_test_exe UT_NAME UT_SRCS)
add_test(${UT_NAME} ${UT_NAME})
endfunction(add_unit_test_exe)


##################################################################
#
# FUNCTION: cfe_exec_do_install
Expand Down
14 changes: 7 additions & 7 deletions modules/cfe_assert/src/cfe_assert_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@ void UT_BSP_StartTestSegment(uint32 SegmentNumber, const char *SegmentName)
void UT_BSP_DoText(uint8 MessageType, const char *OutputMessage)
{
const char *Prefix;
uint32 MsgEnabled = BSP_UT_Global.CurrVerbosity >> MessageType;
uint32 MsgEnabled = BSP_UT_Global.CurrVerbosity >> MessageType;

if (MsgEnabled & 1)
{
switch (MessageType)
{
case UTASSERT_CASETYPE_ABORT:
Prefix = "ABORT";
Prefix = "ABORT";
break;
case UTASSERT_CASETYPE_FAILURE:
Prefix = "FAIL";
Prefix = "FAIL";
break;
case UTASSERT_CASETYPE_MIR:
Prefix = "MIR";
Prefix = "MIR";
break;
case UTASSERT_CASETYPE_TSF:
Prefix = "TSF";
Prefix = "TSF";
break;
case UTASSERT_CASETYPE_TTF:
Prefix = "TTF";
Expand All @@ -93,7 +93,7 @@ void UT_BSP_DoText(uint8 MessageType, const char *OutputMessage)
Prefix = "END";
break;
case UTASSERT_CASETYPE_PASS:
Prefix = "PASS";
Prefix = "PASS";
break;
case UTASSERT_CASETYPE_INFO:
Prefix = "INFO";
Expand Down Expand Up @@ -131,7 +131,7 @@ void UT_BSP_EndTest(const UtAssert_TestCounter_t *TestCounters)
}

CFE_ES_WriteToSysLog("TEST COMPLETE: %u tests Segment(s) executed\n\n",
(unsigned int)TestCounters->TestSegmentCount);
(unsigned int)TestCounters->TestSegmentCount);

OS_TaskExit();
}
12 changes: 4 additions & 8 deletions modules/cfe_assert/src/cfe_assert_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* The value is in milliseconds. Normally this shouldn't be more than
* a second or two for apps to all reach their respective main loop(s).
*/
#define CFE_ASSERT_MAX_STARTUP_WAIT 30000
#define CFE_ASSERT_MAX_STARTUP_WAIT 30000

/*
* Small Extra delay before starting tests.
Expand All @@ -54,15 +54,14 @@
*
* The value is in milliseconds.
*/
#define CFE_ASSERT_START_DELAY 4000

#define CFE_ASSERT_START_DELAY 4000

/*
* Entry point for this application
*/
void CFE_Assert_AppMain(void)
{
int32 rc;
int32 rc;
uint32 RunStatus;

/*
Expand Down Expand Up @@ -113,7 +112,7 @@ void CFE_Assert_AppMain(void)
* registered during startup, then it self-exits.
*/
RunStatus = CFE_ES_RunStatus_APP_RUN;
if(CFE_ES_RunLoop(&RunStatus))
if (CFE_ES_RunLoop(&RunStatus))
{
OS_TaskDelay(CFE_ASSERT_START_DELAY);

Expand All @@ -128,8 +127,5 @@ void CFE_Assert_AppMain(void)
RunStatus = CFE_ES_RunStatus_APP_EXIT;
}


CFE_ES_ExitApp(RunStatus);
}


2 changes: 0 additions & 2 deletions modules/cfe_test/src/cfe_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ int32 CFE_Test_Init(int32 LibId)
UtTest_Add(ES_Test_AppId, NULL, NULL, "ES AppID");
return CFE_SUCCESS;
}


3 changes: 1 addition & 2 deletions modules/cfe_test/src/cfe_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
#include "uttest.h"
#include "utassert.h"

void ES_Test_AppId(void);
void ES_Test_AppId(void);
int32 CFE_Test_Init(int32 LibId);


#endif /* CFE_TEST_H */
4 changes: 1 addition & 3 deletions modules/cfe_test/src/es_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@

#include "cfe_test.h"


void ES_Test_AppId(void)
{
uint32 AppId;
char AppNameBuf[OS_MAX_API_NAME+4];
char AppNameBuf[OS_MAX_API_NAME + 4];

UtAssert_INT32_EQ(CFE_ES_GetAppID(&AppId), CFE_SUCCESS);
UtAssert_INT32_EQ(CFE_ES_GetAppName(AppNameBuf, AppId, sizeof(AppNameBuf)), CFE_SUCCESS);
UtAssert_StrCmp(AppNameBuf, "ASSERT_APP", "CFE_ES_GetAppName() returned ASSERT_APP");
}

0 comments on commit 4016605

Please sign in to comment.