mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 17:20:06 +01:00
test: swap a condition for easier readability
We have an else, so let's not do an `if not foo` condition. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1268>
This commit is contained in:
parent
8fcacca7da
commit
c75d158bc0
1 changed files with 6 additions and 6 deletions
|
|
@ -672,7 +672,12 @@ test_high_and_low_wheel_events_value(struct litest_device *dev,
|
|||
axis,
|
||||
source);
|
||||
|
||||
if (!litest_is_high_res_axis_event(event)) {
|
||||
if (litest_is_high_res_axis_event(event)) {
|
||||
litest_assert_double_eq(
|
||||
libinput_event_pointer_get_scroll_value_v120(ptrev,
|
||||
axis),
|
||||
v120);
|
||||
} else {
|
||||
litest_assert_double_eq(
|
||||
libinput_event_pointer_get_axis_value(ptrev, axis),
|
||||
expected);
|
||||
|
|
@ -680,11 +685,6 @@ test_high_and_low_wheel_events_value(struct litest_device *dev,
|
|||
libinput_event_pointer_get_axis_value_discrete(ptrev,
|
||||
axis),
|
||||
discrete);
|
||||
} else {
|
||||
litest_assert_double_eq(
|
||||
libinput_event_pointer_get_scroll_value_v120(ptrev,
|
||||
axis),
|
||||
v120);
|
||||
}
|
||||
libinput_event_destroy(event);
|
||||
event = libinput_get_event(li);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue