1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-29 13:49:14 +08:00
hybridgroup.gobot/platforms/leap/leap_motion_adaptor_test.go

24 lines
493 B
Go
Raw Normal View History

2014-06-13 13:35:19 -07:00
package leap
import (
"testing"
"github.com/hybridgroup/gobot"
2014-06-13 13:35:19 -07:00
)
2014-06-13 16:01:39 -07:00
func initTestLeapMotionAdaptor() *LeapMotionAdaptor {
2014-11-07 13:15:45 -08:00
a := NewLeapMotionAdaptor("bot", "")
2014-11-19 15:11:00 -08:00
a.connect = func(l *LeapMotionAdaptor) (err error) { return nil }
2014-11-07 13:15:45 -08:00
return a
2014-06-13 13:35:19 -07:00
}
2014-06-13 16:01:39 -07:00
func TestLeapMotionAdaptorConnect(t *testing.T) {
a := initTestLeapMotionAdaptor()
gobot.Assert(t, len(a.Connect()), 0)
2014-06-13 13:35:19 -07:00
}
2014-06-13 16:01:39 -07:00
func TestLeapMotionAdaptorFinalize(t *testing.T) {
a := initTestLeapMotionAdaptor()
gobot.Assert(t, len(a.Finalize()), 0)
2014-06-13 13:35:19 -07:00
}