mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-04-03 16:20:39 +02:00
test: use munit_assert_uint64 for 64-bit values
Otherwise we only take the first 4 bytes which can fail on BE if we're comparing an array directly (like we do for the string test).
This commit is contained in:
parent
f9c6ea30fc
commit
931632effd
1 changed files with 5 additions and 5 deletions
|
|
@ -678,7 +678,7 @@ MUNIT_TEST(test_brei_send_message)
|
|||
buffer_debug(buf, len);
|
||||
|
||||
const struct brei_header *header = (const struct brei_header*)buf;
|
||||
munit_assert_int(header->sender_id, ==, id);
|
||||
munit_assert_uint64(header->sender_id, ==, id);
|
||||
munit_assert_int(header->msglen, ==, msglen);
|
||||
munit_assert_int(header->opcode, ==, opcode);
|
||||
|
||||
|
|
@ -692,8 +692,8 @@ MUNIT_TEST(test_brei_send_message)
|
|||
munit_assert_string_equal(protostring, string);
|
||||
munit_assert_int(memcmp(protostring, string, brei_string_proto_length(slen) - 4), ==, 0);
|
||||
|
||||
munit_assert_int(buf[6 + string_len/4], ==, 0xab);
|
||||
munit_assert_int(buf[8 + string_len/4], ==, 0xcdef);
|
||||
munit_assert_uint64(buf[6 + string_len/4], ==, 0xab);
|
||||
munit_assert_uint64(buf[8 + string_len/4], ==, 0xcdef);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -714,7 +714,7 @@ MUNIT_TEST(test_brei_send_message)
|
|||
buffer_debug(buf, len);
|
||||
|
||||
const struct brei_header *header = (const struct brei_header*)buf;
|
||||
munit_assert_int(header->sender_id, ==, id);
|
||||
munit_assert_uint64(header->sender_id, ==, id);
|
||||
munit_assert_int(header->msglen, ==, msglen);
|
||||
munit_assert_int(header->opcode, ==, opcode);
|
||||
|
||||
|
|
@ -763,7 +763,7 @@ MUNIT_TEST(test_brei_send_message)
|
|||
uint32_t *buf = (uint32_t*)iobuf_data(recv);
|
||||
munit_assert_int(len, ==, msglen);
|
||||
const struct brei_header *header = (const struct brei_header*)buf;
|
||||
munit_assert_int(header->sender_id, ==, id);
|
||||
munit_assert_uint64(header->sender_id, ==, id);
|
||||
munit_assert_int(header->msglen, ==, msglen);
|
||||
munit_assert_int(header->opcode, ==, opcode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue