Skip to content

Commit

Permalink
Fix 69, Coverage not 100% when Signature option set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknutsen committed Feb 28, 2024
1 parent f61b53e commit 7965156
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions unit-test/md_dwell_tbl_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ void MD_ValidTableEntry_Test_InvalidLength(void)
call_count_CFE_EVS_SendEvent);
}

#if MD_SIGNATURE_OPTION == 1
void MD_ValidTableEntry_Test_NotAligned16DwellLength4(void)
{
int32 Result;
Expand Down Expand Up @@ -805,33 +804,6 @@ void MD_ValidTableEntry_Test_NotAligned32(void)
UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0",
call_count_CFE_EVS_SendEvent);
}
#endif

#if MD_SIGNATURE_OPTION == 0
void MD_ValidTableEntry_Test_NotAligned32(void)
{
int32 Result;
MD_TableLoadEntry_t Entry;

Entry.Length = 4;
Entry.DwellAddress.Offset = 1;

UT_SetDefaultReturnValue(UT_KEY(MD_ResolveSymAddr), true);
UT_SetDefaultReturnValue(UT_KEY(MD_ValidAddrRange), true);
UT_SetDefaultReturnValue(UT_KEY(MD_ValidFieldLength), false);

/* Execute the function being tested */
Result = MD_ValidTableEntry(&Entry);

/* Verify results */
UtAssert_True(Result == MD_NOT_ALIGNED_ERROR, "Result == MD_NOT_ALIGNED_ERROR");

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));

UtAssert_True(call_count_CFE_EVS_SendEvent == 0, "CFE_EVS_SendEvent was called %u time(s), expected 0",
call_count_CFE_EVS_SendEvent);
}
#endif

void MD_ValidTableEntry_Test_NotAligned16DwellLength2(void)
{
Expand Down Expand Up @@ -1231,17 +1203,13 @@ void UtTest_Setup(void)
"MD_ValidTableEntry_Test_InvalidAddress");
UtTest_Add(MD_ValidTableEntry_Test_InvalidLength, MD_Test_Setup, MD_Test_TearDown,
"MD_ValidTableEntry_Test_InvalidLength");

#if MD_SIGNATURE_OPTION == 1
UtTest_Add(MD_ValidTableEntry_Test_NotAligned16DwellLength4, MD_Test_Setup, MD_Test_TearDown,
"MD_ValidTableEntry_Test_NotAligned16DwellLength4");
UtTest_Add(MD_ValidTableEntry_Test_Aligned32, MD_Test_Setup, MD_Test_TearDown, "MD_ValidTableEntry_Test_Aligned32");
UtTest_Add(MD_ValidTableEntry_Test_NotAligned32, MD_Test_Setup, MD_Test_TearDown,
"MD_ValidTableEntry_Test_NotAligned32");
UtTest_Add(MD_ValidTableEntry_Test_NotAligned16DwellLength2, MD_Test_Setup, MD_Test_TearDown,
"MD_ValidTableEntry_Test_NotAligned16DwellLength2");
#endif

UtTest_Add(MD_ValidTableEntry_Test_ElseSuccess, MD_Test_Setup, MD_Test_TearDown,
"MD_ValidTableEntry_Test_ElseSuccess");

Expand Down

0 comments on commit 7965156

Please sign in to comment.