1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-26 13:48:49 +08:00
hybridgroup.gobot/platforms/opencv/camera_driver_test.go
2014-07-23 15:13:25 -07:00

39 lines
722 B
Go

package opencv
import (
"github.com/hybridgroup/gobot"
"testing"
)
func initTestCameraDriver() *CameraDriver {
return NewCameraDriver("bot", "")
}
func TestCameraDriverStart(t *testing.T) {
t.SkipNow()
d := initTestCameraDriver()
gobot.Assert(t, d.Start(), true)
}
func TestCameraDriverStartPanic(t *testing.T) {
recovered := false
defer func() {
if r := recover(); r != nil {
recovered = true
}
}()
NewCameraDriver("bot", false).Start()
gobot.Expect(t, recovered, true)
}
func TestCameraDriverHalt(t *testing.T) {
d := initTestCameraDriver()
gobot.Assert(t, d.Halt(), true)
}
func TestCameraDriverInit(t *testing.T) {
d := initTestCameraDriver()
gobot.Assert(t, d.Init(), true)
}