test: fix two compiler warnings
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 11 Dec 2014 06:30:03 +0000 (16:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 11 Dec 2014 07:34:05 +0000 (17:34 +1000)
device.c:596:2: warning: incompatible pointer to integer conversion
initializing 'intmax_t' (aka 'long') with an expression of type 'struct
libinput_device *' [-Wint-conversion]
        ck_assert_int_eq(libinput_event_get_device(event),

use ck_assert_ptr_eq() instead

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/device.c

index 16bb99c97640c8b078f5f49fbdc041a6e79e8a4a..76486f032290ce63d9011ca3bea27a37392a0430 100644 (file)
@@ -593,7 +593,7 @@ START_TEST(device_disable_topsoftbutton)
        event = libinput_get_event(li);
        ck_assert_int_eq(libinput_event_get_type(event),
                         LIBINPUT_EVENT_POINTER_BUTTON);
-       ck_assert_int_eq(libinput_event_get_device(event),
+       ck_assert_ptr_eq(libinput_event_get_device(event),
                         trackpoint->libinput_device);
        ptrevent = libinput_event_get_pointer_event(event);
        ck_assert_int_eq(libinput_event_pointer_get_button(ptrevent),
@@ -605,7 +605,7 @@ START_TEST(device_disable_topsoftbutton)
        event = libinput_get_event(li);
        ck_assert_int_eq(libinput_event_get_type(event),
                         LIBINPUT_EVENT_POINTER_BUTTON);
-       ck_assert_int_eq(libinput_event_get_device(event),
+       ck_assert_ptr_eq(libinput_event_get_device(event),
                         trackpoint->libinput_device);
        ptrevent = libinput_event_get_pointer_event(event);
        ck_assert_int_eq(libinput_event_pointer_get_button(ptrevent),