-
Notifications
You must be signed in to change notification settings - Fork 43
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
Unit test fails when VER_2 headers are used #87
Comments
Probably easiest to just remove the explicit string check (pass in blank). |
Yeah, this is why I don't like to check derived output in UT. My recommendation is (and has always been) to only check the direct outputs of the unit under test, which in this case is the format string (i.e. "SAMPLE: invalid command packet,MID = 0x%x") not the fully formed output string, which is dependent on a number of factors outside the control of the unit under test. IIRC there were some folks specifically wanting to do this type of test and hence why it was included in sample_app example. A possible compromise would be to only check the format string. |
Note with nasa/cFE#880 the reported error is now consistent since message ID base type is uint32. |
Fix #87, Unit test MID string format now 32bit
Describe the bug
Event test strings are different when the MsgId size changes, but test looks for explict message:
sample_app/fsw/src/sample_app.c
Lines 274 to 277 in c1348d6
sample_app/unit-test/coveragetest/coveragetest_sample_app.c
Line 290 in c1348d6
sample_app/unit-test/coveragetest/coveragetest_sample_app.c
Line 549 in c1348d6
!VER_2 =
0xffff
, VER_2 =0xffffffff
(or capitalized based on the format string)To Reproduce
Set MESSAGE_FORMAT_IS_CCSDS_VER_2, build and run unit tests.
Expected behavior
Unit tests should pass with either configuration
Code snips
See above.
System observed on:
Additional context
None
Reporter Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: