projects
/
platform
/
upstream
/
libevdev.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13ba771
)
test: add test for libevdev_is_event_code(EV_SYN...)
author
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 23 Aug 2013 00:57:50 +0000
(10:57 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Thu, 29 Aug 2013 01:36:20 +0000
(11:36 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/test-event-names.c
patch
|
blob
|
history
diff --git
a/test/test-event-names.c
b/test/test-event-names.c
index
9b07e32
..
23a59e7
100644
(file)
--- a/
test/test-event-names.c
+++ b/
test/test-event-names.c
@@
-266,6
+266,11
@@
START_TEST(test_event_code)
}
ck_assert_int_eq(libevdev_is_event_code(&ev, EV_MAX + 1, ev.code), 0);
ck_assert_int_eq(libevdev_is_event_code(&ev, EV_REL, REL_MAX + 1), 0);
+
+ ev.type = EV_SYN;
+ ev.code = SYN_REPORT;
+ ck_assert_int_eq(libevdev_is_event_code(&ev, EV_SYN, SYN_REPORT), 1);
+ ck_assert_int_eq(libevdev_is_event_code(&ev, EV_SYN, SYN_DROPPED), 0);
}
END_TEST