-
Notifications
You must be signed in to change notification settings - Fork 204
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 #1678 Add Functional Tests for cFE Message ID APIs #1736
Fix #1678 Add Functional Tests for cFE Message ID APIs #1736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! See suggestions.
2b72fcf
to
c73d8da
Compare
* the msg to type relationship is also implementation defined, black box test just calls the routine | ||
* to confirm things don't "break" with full range values and the implementation exists. | ||
*/ | ||
CFE_MSG_GetTypeFromMsgId(msgid, &msgtype); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't just be not checked at all. It could be checked that the returns equals either CFE_SUCCESS or CFE_MSG_BAD_ARGUMENT, or could use UtAssert_NOT_NULL.
CFE_MSG_Message_t msg; | ||
CFE_SB_MsgId_t msgid = CFE_SB_ValueToMsgId(1); | ||
|
||
UtAssert_INT32_EQ(CFE_MSG_SetMsgId(&msg, msgid), CFE_SUCCESS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use GetMsgId to check that the value you set it to is also correct.
dd8e730
to
abca091
Compare
abca091
to
73c1565
Compare
nasa/cFE#1742, Remove SB get last message sender info requirement nasa/cFE#1732, Fix #1725 Update UTs to use UtAssert_MIR nasa/cFE#1736, Add Functional Tests cFE Message ID nasa/cFE#1707, Add Time Conversion Functional Test
**Combines** nasa/cFE#1759, v6.8.0-rc1+dev810 nasa/osal#1126, v5.1.0-rc1+dev586 **Includes** *cFE* - nasa/cFE#1752, Add null pointer check to table GetAddresses and ReleaseAddresses - nasa/cFE#1742, Remove SB get last message sender info requirement - nasa/cFE#1732, Fix #1725 Update UTs to use UtAssert_MIR - nasa/cFE#1736, Add Functional Tests cFE Message ID - nasa/cFE#1707, Add Time Conversion Functional Test - nasa/cFE#1739, Add cast to MIR prints *osal* - nasa/osal#1122, Add UtAssert_MIR macro - nasa/osal#1125, add generic asserts from CFE coverage testing - nasa/osal#1121, add osapi-shell-stubs.c to OSAL stub library Co-authored-by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored-by: Alex Campbell <zanzaben@users.noreply.github.com> Co-authored-by: Jose F Martinez Pedraza <pepepr08@users.noreply.github.com> Co-authored-by: Niall Mullane <nmullane@users.noreply.github.com> Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com> Co-authored-by: Paul <pavll@users.noreply.github.com>
Describe the contribution
Fixes #1678
Add functional tests for cFE Message Id APIs
CFE_MSG_GetMsgId - Gets the message id from a message.
CFE_MSG_SetMsgId - Sets the message id bits in a message.
CFE_MSG_GetTypeFromMsgId - Gets message type using message ID.
Testing performed
Tested in functional tests and format check workflows on fork.
Expected behavior changes
Tests functionality for cFE Message Id APIs
Contributor Info - All information REQUIRED for consideration of pull request
Ariel Adams, ASRC Federal