test_connection: check empty packet sequence numbers

This commit is contained in:
Thomas Kolb 2025-02-22 20:44:00 +01:00
commit 008a3faf13

View file

@ -222,4 +222,16 @@ int main(void)
ASSERT_TRUE(header_decoded_ok);
ASSERT_EQUAL_UINT(L2_MSG_TYPE_EMPTY, header.msg_type);
// check that the empty packet acknowledges 1 packet: the connection parameters
ASSERT_EQUAL_UINT(1, header.rx_seq_nr);
// empty packets must have sequence number 0
ASSERT_EQUAL_UINT(0, header.tx_seq_nr);
LOG(LVL_INFO, ">>> Connection state must not be changed by the empty queue/packet operations.");
ASSERT_STATE(expected_state, conn);
LOG(LVL_INFO, ">>> All assertions successful.");
}