summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2023-03-29 10:59:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2023-03-29 11:14:27 +1000
commit40869bf11eb9bdcabb6e8c01f0abd042511c8e21 (patch)
tree7145baae85aa4417ff1610bc196c4b2ec1f5086a
parentf8497bf176ef4a7fcdb41ac8268be2e899b05a64 (diff)
downloadlibinput-40869bf11eb9bdcabb6e8c01f0abd042511c8e21.tar.gz
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>
-rw-r--r--test/litest.h11
-rw-r--r--test/test-pointer.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/test/litest.h b/test/litest.h
index 7ac54f3e..baba5cbb 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -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;
diff --git a/test/test-pointer.c b/test/test-pointer.c
index 945e490b..78fb2760 100644
--- a/test/test-pointer.c
+++ b/test/test-pointer.c
@@ -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);