You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
This unit test should pass. I am not sure why the unit test is expecting 65535 for the first and middle element and 32767 for the last element in sc_cmds_tests.c. Also not sure why the first and middle elements use different asserts compared to the last element but these don't appear to affect the behavior as they result in the same assert.
The tests fail because they are relatively naive, in the sense that they are written to mostly work with the default set-up (leaving SC_NUMBER_OF_RTS at 64).
However, the tests do work with other values of SC_NUMBER_OF_RTS, as long it is is a multiple of 16 within a certain range (48 - 96), because these will still allow the ones to fill every bit and match the 65535 and 32767 values it's comparing against.
Checklist (Please check before submitting)
Describe the bug
The
SC_SendHkPacket_Test
unit test fails. The expectedRtsExecutingStatus
andRtsDisabledStatus
are not sent to the SB.To Reproduce
make SIMULATION=native ENABLE_UNIT_TESTS=true prep && make && make install
make test
The
SC_SendHkPacket_Test
unit test will fail:Expected behavior
This unit test should pass. I am not sure why the unit test is expecting 65535 for the first and middle element and 32767 for the last element in
sc_cmds_tests.c
. Also not sure why the first and middle elements use different asserts compared to the last element but these don't appear to affect the behavior as they result in the same assert.Code snips
/* Check first element */
UtAssert_True(SC_OperData.HkPacket.RtsExecutingStatus[0] == 65535,
"SC_OperData.HkPacket.RtsExecutingStatus[0] == 65535"); // fails
UtAssert_True(SC_OperData.HkPacket.RtsDisabledStatus[0] == 65535,
"SC_OperData.HkPacket.RtsDisabledStatus[0] == 65535"); // fails
/* Check middle element */
UtAssert_True(SC_OperData.HkPacket.RtsExecutingStatus[2] == 65535,
"SC_OperData.HkPacket.RtsExecutingStatus[2] == 65535"); // fails
UtAssert_True(SC_OperData.HkPacket.RtsDisabledStatus[2] == 65535,
"SC_OperData.HkPacket.RtsDisabledStatus[2] == 65535"); // fails
/* Check last element */
UtAssert_INT32_EQ(SC_OperData.HkPacket.RtsExecutingStatus[LastRtsHkIndex], 32767); // fails
UtAssert_INT32_EQ(SC_OperData.HkPacket.RtsDisabledStatus[LastRtsHkIndex], 32767); // fails
The text was updated successfully, but these errors were encountered: