mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 05:28:02 +02:00
test: rename a variable to avoid clashes
Future changes will use slen further below because it's the best name, so let's rename this one since it's less impactful.
This commit is contained in:
parent
1bac0c28b4
commit
90040096dd
1 changed files with 5 additions and 5 deletions
|
|
@ -647,10 +647,10 @@ MUNIT_TEST(test_brei_send_message)
|
||||||
|
|
||||||
{
|
{
|
||||||
const char string[12] = "hello wor"; /* tests padding too */
|
const char string[12] = "hello wor"; /* tests padding too */
|
||||||
int slen = bytes_to_int32(strlen0(string)) * 4;
|
uint32_t string_len = bytes_to_int32(strlen0(string)) * 4;
|
||||||
munit_assert_int(slen, ==, sizeof(string));
|
munit_assert_int(string_len, ==, sizeof(string));
|
||||||
|
|
||||||
const int msglen = header_size + 24 + slen; /* 4 bytes + 2 * 8 bytes + string length */
|
const int msglen = header_size + 24 + string_len; /* 4 bytes + 2 * 8 bytes + string length */
|
||||||
object_id_t id = 2;
|
object_id_t id = 2;
|
||||||
uint32_t opcode = 3;
|
uint32_t opcode = 3;
|
||||||
const char *signature = "ison";
|
const char *signature = "ison";
|
||||||
|
|
@ -677,8 +677,8 @@ MUNIT_TEST(test_brei_send_message)
|
||||||
munit_assert_string_equal(s->str, string);
|
munit_assert_string_equal(s->str, string);
|
||||||
munit_assert_int(memcmp(s->str, string, brei_string_proto_length(s->len) - 4), ==, 0);
|
munit_assert_int(memcmp(s->str, string, brei_string_proto_length(s->len) - 4), ==, 0);
|
||||||
|
|
||||||
munit_assert_int(buf[6 + slen/4], ==, 0xab);
|
munit_assert_int(buf[6 + string_len/4], ==, 0xab);
|
||||||
munit_assert_int(buf[8 + slen/4], ==, 0xcdef);
|
munit_assert_int(buf[8 + string_len/4], ==, 0xcdef);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue