Skip to content

Commit

Permalink
Merge pull request #78 from jphickey/fix-77-deprecate-psp-stubs
Browse files Browse the repository at this point in the history
Fix #77, deprecate PSP stubs from MD coverage test
  • Loading branch information
dzbaker authored Sep 23, 2024
2 parents 40aeed1 + b7ebab5 commit e0e84eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
10 changes: 1 addition & 9 deletions unit-test/md_dwell_pkt_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,7 @@ void MD_DwellLoop_Test_DataError(void)

UtAssert_True(strCmpResult == 0, "Event string matched expected result, '%s'", context_CFE_EVS_SendEvent[0].Spec);

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));

UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1",
call_count_CFE_EVS_SendEvent);

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));

UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1",
call_count_CFE_EVS_SendEvent);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 3);
}

void MD_GetDwellData_Test_MemRead8Error(void)
Expand Down
40 changes: 0 additions & 40 deletions unit-test/utilities/md_test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,43 +96,3 @@ void MD_Test_TearDown(void)
{
/* cleanup test environment */
}

int32 CFE_PSP_MemWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemRead16(cpuaddr MemoryAddress, uint16 *uint16Value)
{
if (!MemoryAddress)
return -2;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemRead32(cpuaddr MemoryAddress, uint32 *uint32Value)
{
if (!MemoryAddress)
return -3;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

0 comments on commit e0e84eb

Please sign in to comment.