mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 14:00:06 +01:00
test: fix double comparison macros
args needs to be within () to ensure correct calculation Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Stephen Chandler Paul <thatslyude@gmail.com>
This commit is contained in:
parent
6df8c70c3b
commit
c23fb36eb1
1 changed files with 6 additions and 6 deletions
|
|
@ -195,22 +195,22 @@ struct libevdev_uinput * litest_create_uinput_abs_device(const char *name,
|
|||
const struct input_absinfo *abs,
|
||||
...);
|
||||
#define litest_assert_double_eq(a_, b_)\
|
||||
ck_assert_int_eq((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_eq((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
#define litest_assert_double_ne(a_, b_)\
|
||||
ck_assert_int_ne((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_ne((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
#define litest_assert_double_lt(a_, b_)\
|
||||
ck_assert_int_lt((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_lt((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
#define litest_assert_double_le(a_, b_)\
|
||||
ck_assert_int_le((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_le((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
#define litest_assert_double_gt(a_, b_)\
|
||||
ck_assert_int_gt((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_gt((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
#define litest_assert_double_ge(a_, b_)\
|
||||
ck_assert_int_ge((int)(a_ * 256), (int)(b_ * 256))
|
||||
ck_assert_int_ge((int)((a_) * 256), (int)((b_) * 256))
|
||||
|
||||
void litest_timeout_tap(void);
|
||||
void litest_timeout_softbuttons(void);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue