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

Identical assert repeated twice (unintentionally) #48

Closed
2 tasks done
thnkslprpt opened this issue Mar 5, 2023 · 0 comments · Fixed by #49
Closed
2 tasks done

Identical assert repeated twice (unintentionally) #48

thnkslprpt opened this issue Mar 5, 2023 · 0 comments · Fixed by #49

Comments

@thnkslprpt
Copy link
Contributor

Checklist

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
Assert of (call_count_CFE_EVS_SendEvent == 0... seems to have been pasted twice by mistake.

Code snips

MD/unit-test/md_app_tests.c

Lines 460 to 475 in 87e0c1f

/* Verify results */
UtAssert_True(Result == -1, "Result == -1");
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);
strCmpResult = strncmp(ExpectedSysLogString, context_CFE_ES_WriteToSysLog.Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH);
UtAssert_True(strCmpResult == 0, "Sys Log string matched expected result, '%s'", context_CFE_ES_WriteToSysLog.Spec);
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);

Expected behavior
Removing unintentionally repeated test will make cleaner test code.

Reporter Info
Avi Weiss @thnkslprpt

thnkslprpt added a commit to thnkslprpt/MD that referenced this issue Mar 5, 2023
dzbaker added a commit that referenced this issue May 4, 2023
Fix #48, Remove unintentionally repeated identical assert
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants