mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
Increase joystick test coverage
This commit is contained in:
parent
005c07aace
commit
56ceb26484
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user