mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 09:20:29 +01:00
test: type-safe two ck_assert invocations
unsigned vs signed in both cases, but the ck_assert macros hide that (everything is cast to intmax_t). The upcoming litest_assert wrappers expose these warnings, so fix them ahead of time. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6acd97457f
commit
7b965b63c0
1 changed files with 3 additions and 2 deletions
|
|
@ -611,9 +611,10 @@ litest_init_udev_rules(struct litest_test_device *dev)
|
|||
UDEV_RULE_PREFIX,
|
||||
dev->shortname);
|
||||
ck_assert_int_eq(rc,
|
||||
(int)(
|
||||
strlen(UDEV_RULES_D) +
|
||||
strlen(UDEV_RULE_PREFIX) +
|
||||
strlen(dev->shortname) + 7);
|
||||
strlen(dev->shortname) + 7));
|
||||
f = fopen(path, "w");
|
||||
ck_assert_notnull(f);
|
||||
ck_assert_int_ge(fputs(dev->udev_rule, f), 0);
|
||||
|
|
@ -1170,7 +1171,7 @@ litest_scale(const struct litest_device *d, unsigned int axis, double val)
|
|||
int min, max;
|
||||
ck_assert_int_ge(val, 0);
|
||||
ck_assert_int_le(val, 100);
|
||||
ck_assert_int_le(axis, ABS_Y);
|
||||
ck_assert_int_le(axis, (unsigned int)ABS_Y);
|
||||
|
||||
min = d->interface->min[axis];
|
||||
max = d->interface->max[axis];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue