test: avoid erroneous devices to be passed into the test suites
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 4 Aug 2014 02:49:59 +0000 (12:49 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 01:30:15 +0000 (11:30 +1000)
commit647b2ba18d0ebcacd70c3f808197b8c8d3c8ea07
treeb49dfc50082793c659144db930aeeba0ed58d04d
parente9239d81a95e7968a2a3bc929cde63a0cc64b8e3
test: avoid erroneous devices to be passed into the test suites

The litest features overlap with the litest device specifiers, so it's easy to
pass in LITEST_MOUSE where LITEST_POINTER should be passed in, and vice versa.
Lacking proper type checking the best we can do here is simply move the
devices into the negative range and check for that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test/litest.c
test/litest.h