test: minor cleanups

A whitespace fix, moving a check-related #define closer to the #include
and change a test that doesn't need a device to litest_add_no_device().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2023-03-29 10:59:45 +10:00
parent f8497bf176
commit 40869bf11e
2 changed files with 7 additions and 6 deletions

View file

@ -35,6 +35,10 @@
#include <libinput.h>
#include <math.h>
#ifndef ck_assert_notnull
#define ck_assert_notnull(ptr) ck_assert_ptr_ne(ptr, NULL)
#endif
#include "check-double-macros.h"
#include "libinput-private-config.h"
@ -981,10 +985,6 @@ litest_semi_mt_touch_up(struct litest_device *d,
struct litest_semi_mt *semi_mt,
unsigned int slot);
#ifndef ck_assert_notnull
#define ck_assert_notnull(ptr) ck_assert_ptr_ne(ptr, NULL)
#endif
static inline void
litest_enable_tap(struct libinput_device *device)
{
@ -1259,7 +1259,8 @@ litest_send_file(int sock, int fd)
return write(sock, buf, n);
}
static inline int litest_slot_count(struct litest_device *dev)
static inline int
litest_slot_count(struct litest_device *dev)
{
if (dev->which == LITEST_ALPS_3FG)
return 2;

View file

@ -3703,7 +3703,7 @@ TEST_COLLECTION(pointer)
litest_add(pointer_scroll_button_noscroll, LITEST_ANY, LITEST_RELATIVE|LITEST_BUTTON);
litest_add(pointer_scroll_button_no_event_before_timeout, LITEST_RELATIVE|LITEST_BUTTON, LITEST_ANY);
litest_add(pointer_scroll_button_middle_emulation, LITEST_RELATIVE|LITEST_BUTTON, LITEST_ANY);
litest_add(pointer_scroll_button_device_remove_while_down, LITEST_ANY, LITEST_RELATIVE|LITEST_BUTTON);
litest_add_no_device(pointer_scroll_button_device_remove_while_down);
litest_add(pointer_scroll_button_lock, LITEST_RELATIVE|LITEST_BUTTON, LITEST_ANY);
litest_add(pointer_scroll_button_lock_defaults, LITEST_RELATIVE|LITEST_BUTTON, LITEST_ANY);