Skip to content

Commit

Permalink
fixup! Fix nasa#211, add DisplayValue command
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Nov 1, 2023
1 parent f4973e3 commit 1692670
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions unit-test/coveragetest/coveragetest_sample_app_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ void Test_SAMPLE_APP_ProcessCmd(void)
UtAssert_INT32_EQ(SAMPLE_APP_ProcessCmd(&TestMsg), CFE_SUCCESS);

/*
* Successful operation results in two calls to CFE_ES_WriteToSysLog() - one
* in this function reporting the table values, and one through
* SAMPLE_APP_GetCrc().
* This only needs to account for the call to CFE_ES_WriteToSysLog() directly
* invoked by the unit under test. Note that in this build environment, the
* SAMPLE_APP_GetCrc() function is a stub.
*/
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 2);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 1);

/*
* Confirm that the CFE_TBL_GetAddress() call was done
Expand All @@ -168,19 +168,19 @@ void Test_SAMPLE_APP_ProcessCmd(void)
*/
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_TBL_ERR_UNREGISTERED);
UtAssert_INT32_EQ(SAMPLE_APP_ProcessCmd(&TestMsg), CFE_TBL_ERR_UNREGISTERED);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 3);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 2);

/*
* Configure CFE_TBL_ReleaseAddress() to return an error, exercising the
* error return path.
* Confirm three additional calls to CFE_ES_WriteToSysLog() - one
* reporting the table values, one through SAMPLE_APP_GetCrc() and one
* through the CFE_TBL_ReleaseAddress() error path.
* Confirm two additional calls to CFE_ES_WriteToSysLog() - one
* reporting the table values, and one through the CFE_TBL_ReleaseAddress()
* error path.
*/
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_ReleaseAddress), CFE_TBL_ERR_NO_ACCESS);
UtAssert_INT32_EQ(SAMPLE_APP_ProcessCmd(&TestMsg), CFE_TBL_ERR_NO_ACCESS);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 6);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 4);
}

/*
Expand Down

0 comments on commit 1692670

Please sign in to comment.