diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-21 11:43:43 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-31 14:56:47 +1000 |
commit | e385ef32dedfe6872b86c5b8221bbcf85f533c89 (patch) | |
tree | f3f507876a375eb758ab7bd090e22a6ee0318b50 | |
parent | 98e5d5529c435bf542268c916f8bf85c478705bd (diff) |
test: prepare eventcomm test for X header removal
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | test/eventcomm-test.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/eventcomm-test.c b/test/eventcomm-test.c index 677c960..5cf2639 100644 --- a/test/eventcomm-test.c +++ b/test/eventcomm-test.c @@ -29,6 +29,8 @@ #endif #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <assert.h> #include "synapticsstr.h" @@ -74,9 +76,8 @@ write_event(int fd, struct input_event *ev, int n) } static void -test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm) +test_buttons(int fd, SynapticsPrivate *priv, struct CommData *comm) { - SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; struct SynapticsHwState *hw = NULL; struct input_event ev = { {0, 0}, EV_KEY, 0, 0 }; @@ -118,7 +119,6 @@ test_buttons(int fd, InputInfoPtr pInfo, struct CommData *comm) static void test_read_hw_state(void) { - InputInfoRec info = { 0 }; SynapticsPrivate private; struct SynapticsHwState *hw = NULL; struct CommData comm = { 0 }; @@ -135,8 +135,6 @@ test_read_hw_state(void) memset(&private, 0, sizeof(private)); - info.private = &private; - info.fd = fd_read; private.fd = fd_read; private.proto_data = EventProtoDataAlloc(); @@ -185,7 +183,7 @@ test_read_hw_state(void) assert(hw->fingerWidth == ev[6].value); /* the various buttons */ - test_buttons(fd_write, &info, &comm); + test_buttons(fd_write, &private, &comm); free(private.proto_data); SynapticsHwStateFree(&hw); @@ -226,7 +224,6 @@ static void test_ignore_hw_state(void) { int i; - InputInfoRec info = { 0 }; SynapticsPrivate private; struct SynapticsHwState *hw = NULL; struct SynapticsHwState *hw_zero = NULL; @@ -262,8 +259,6 @@ test_ignore_hw_state(void) struct input_event ev = { {0, 0}, 0, 0, 1 }; memset(&private, 0, sizeof(private)); - info.private = &private; - info.fd = fd_read; private.fd = fd_read; private.proto_data = EventProtoDataAlloc(); |