From 56ceb26484b9e688c96bcca1771c5c6ad20b9b9c Mon Sep 17 00:00:00 2001 From: Adrian Zankich Date: Wed, 19 Nov 2014 18:54:31 -0800 Subject: [PATCH] Increase joystick test coverage --- platforms/joystick/joystick_adaptor_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platforms/joystick/joystick_adaptor_test.go b/platforms/joystick/joystick_adaptor_test.go index 32200c7d..50db2c2f 100644 --- a/platforms/joystick/joystick_adaptor_test.go +++ b/platforms/joystick/joystick_adaptor_test.go @@ -1,6 +1,7 @@ package joystick import ( + "errors" "testing" "github.com/hybridgroup/gobot" @@ -18,6 +19,9 @@ func initTestJoystickAdaptor() *JoystickAdaptor { func TestJoystickAdaptorConnect(t *testing.T) { a := initTestJoystickAdaptor() gobot.Assert(t, a.Connect(), nil) + + a = NewJoystickAdaptor("bot") + gobot.Assert(t, a.Connect(), errors.New("No joystick available")) } func TestJoystickAdaptorFinalize(t *testing.T) {