test: fix a bunch of checks for a given switch
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 28 May 2020 05:25:02 +0000 (15:25 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 3 Jun 2020 22:32:56 +0000 (22:32 +0000)
commit8ee3b7a7f2d0337c1c4af79fa0d3a93d292b9ca9
tree6faae591daef5d846a3c333644405bd135b938b0
parent4058c43579f23b3abe288b7480fe2a4e70aaea20
test: fix a bunch of checks for a given switch

The has_switch() function returns -1 if the device doesn't have the switch
capability - which is the same as "true" and how we used this so far. Fix the
checks.

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