Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #49, Move variables declared mid-function to the top #50

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion unit-test/lc_action_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,12 +1685,13 @@ void LC_ValidateRPN_Test_StackDepthZero2(void)

void LC_ValidateRPN_Test_MaxRPNSize(void)
{
int i;
uint8 Result;

int32 IndexValue = 0;
int32 StackDepthValue = 0;

for (int i = 0; i < LC_MAX_RPN_EQU_SIZE; i++)
for (i = 0; i < LC_MAX_RPN_EQU_SIZE; i++)
{
LC_OperData.ADTPtr[0].RPNEquation[i] = LC_MAX_WATCHPOINTS - 1;
}
Expand Down
15 changes: 6 additions & 9 deletions unit-test/lc_app_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,12 +1343,11 @@ void LC_CreateTaskCDS_Test_Nominal(void)
void LC_CreateTaskCDS_Test_WRTRegisterCDSError(void)
{
int32 Result;

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 1, -1);

int32 strCmpResult;
char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 1, -1);

snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH, "Error registering WRT CDS Area, RC=0x%%08X");

Result = LC_CreateTaskCDS();
Expand All @@ -1367,12 +1366,11 @@ void LC_CreateTaskCDS_Test_WRTRegisterCDSError(void)
void LC_CreateTaskCDS_Test_ARTRegisterCDSError(void)
{
int32 Result;

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 2, -1);

int32 strCmpResult;
char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 2, -1);

snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH, "Error registering ART CDS Area, RC=0x%%08X");

Result = LC_CreateTaskCDS();
Expand All @@ -1391,12 +1389,11 @@ void LC_CreateTaskCDS_Test_ARTRegisterCDSError(void)
void LC_CreateTaskCDS_Test_AppDataRegisterCDSError(void)
{
int32 Result;

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 3, -1);

int32 strCmpResult;
char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];

UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterCDS), 3, -1);

snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH,
"Error registering application data CDS Area, RC=0x%%08X");

Expand Down
Loading