Skip to content

Commit

Permalink
Merge pull request #229 from zanzaben/fix228_Rename_UT_ClearForceFail
Browse files Browse the repository at this point in the history
Fix #228, Refactor UT_ClearForceFail to UT_ClearDefaultReturnValue
  • Loading branch information
astrogeco authored Jan 22, 2021
2 parents 321c00b + 4783578 commit 70b756c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ void Test_OS_Application_Startup(void)
UT_SetDefaultReturnValue(UT_KEY(OS_API_Init), OS_ERROR);
UT_OS_Application_Startup();
UtAssert_INT32_EQ(UT_GetStubCount(UT_KEY(PCS_exit)), 1);
UT_ClearForceFail(UT_KEY(OS_API_Init));
UT_ClearDefaultReturnValue(UT_KEY(OS_API_Init));

/* failure of OS_FileSysAddFixedMap - an extra OS_printf */
UT_SetDefaultReturnValue(UT_KEY(OS_FileSysAddFixedMap), OS_ERROR);
UT_OS_Application_Startup();
UtAssert_INT32_EQ(UT_GetStubCount(UT_KEY(OS_printf)), 9);
UtAssert_INT32_EQ(UT_GetStubCount(UT_KEY(PCS_SystemMain)), 2);
UT_ClearForceFail(UT_KEY(OS_FileSysAddFixedMap));
UT_ClearDefaultReturnValue(UT_KEY(OS_FileSysAddFixedMap));

/* coverage for each of the reset types */
*PCS_SYS_REG_BLRR = PCS_SYS_REG_BLRR_PWRON;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void Test_CFE_PSP_Exception_GetSummary(void)
CFE_PSP_Exception_WriteComplete();
UT_SetDefaultReturnValue(UT_KEY(OS_TaskFindIdBySystemData), OS_ERROR);
UtAssert_INT32_EQ(CFE_PSP_Exception_GetSummary(&LogId, &TaskId, ReasonBuf, sizeof(ReasonBuf)), CFE_PSP_SUCCESS);
UT_ClearForceFail(UT_KEY(OS_TaskFindIdBySystemData));
UT_ClearDefaultReturnValue(UT_KEY(OS_TaskFindIdBySystemData));
UtAssert_NONZERO(LogId);
UtAssert_ZERO(OS_ObjectIdToInteger(TaskId));

Expand Down

0 comments on commit 70b756c

Please sign in to comment.