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 69, Coverage not 100% when Signature option set to 0 #70

Merged
merged 1 commit into from
Feb 29, 2024
Merged
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
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
Loading