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

40 lines
793 B
Go
Raw Normal View History

2014-04-27 16:58:34 -07:00
package opencv
import (
2014-07-16 16:37:58 -05:00
cv "github.com/hybridgroup/go-opencv/opencv"
2014-06-13 13:45:50 -07:00
"github.com/hybridgroup/gobot"
"testing"
2014-07-16 16:37:58 -05:00
"path"
"runtime"
)
2014-06-13 16:01:39 -07:00
func initTestWindowDriver() *WindowDriver {
return NewWindowDriver("bot")
2014-06-13 13:45:50 -07:00
}
2014-06-13 16:01:39 -07:00
func TestWindowDriverStart(t *testing.T) {
2014-07-16 16:37:58 -05:00
t.SkipNow()
2014-06-13 16:01:39 -07:00
d := initTestWindowDriver()
gobot.Assert(t, d.Start(), true)
2014-06-13 13:45:50 -07:00
}
2014-06-13 16:01:39 -07:00
func TestWindowDriverHalt(t *testing.T) {
d := initTestWindowDriver()
gobot.Assert(t, d.Halt(), true)
2014-06-13 13:45:50 -07:00
}
2014-06-13 16:01:39 -07:00
func TestWindowDriverInit(t *testing.T) {
d := initTestWindowDriver()
gobot.Assert(t, d.Init(), true)
2014-06-13 13:45:50 -07:00
}
2014-07-16 16:37:58 -05:00
func TestWindowDriverShowImage(t *testing.T) {
t.SkipNow()
d := initTestWindowDriver()
_, currentfile, _, _ := runtime.Caller(0)
image := cv.LoadImage(path.Join(path.Dir(currentfile), "test.png"))
d.Start()
d.ShowImage(image)
}