1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00

Update opencv tests

This commit is contained in:
Adrian Zankich 2014-06-13 13:45:50 -07:00
parent 10aee2201d
commit b2ecaffe86
3 changed files with 40 additions and 51 deletions

View File

@ -1,26 +1,27 @@
package opencv
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/hybridgroup/gobot"
"testing"
)
var _ = Describe("Camera", func() {
var (
c *CameraDriver
)
var c *CameraDriver
BeforeEach(func() {
c = NewCameraDriver("bot", 0)
})
func init() {
c = NewCameraDriver("bot", 0)
}
PIt("Must be able to Start", func() {
Expect(c.Start()).To(Equal(true))
})
PIt("Must be able to Init", func() {
Expect(c.Init()).To(Equal(true))
})
PIt("Must be able to Halt", func() {
Expect(c.Halt()).To(Equal(true))
})
})
func TestCameraStart(t *testing.T) {
t.SkipNow()
gobot.Expect(t, c.Start(), true)
}
func TestCameraHalt(t *testing.T) {
t.SkipNow()
gobot.Expect(t, c.Halt(), true)
}
func TestCameraInit(t *testing.T) {
t.SkipNow()
gobot.Expect(t, c.Init(), true)
}

View File

@ -1,13 +0,0 @@
package opencv
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestGobotOpencv(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Gobot-Opencv Suite")
}

View File

@ -1,26 +1,27 @@
package opencv
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/hybridgroup/gobot"
"testing"
)
var _ = Describe("Window", func() {
var (
w *WindowDriver
)
var w *WindowDriver
BeforeEach(func() {
w = NewWindowDriver("bot")
})
func init() {
w = NewWindowDriver("bot")
}
PIt("Must be able to Start", func() {
Expect(w.Start()).To(Equal(true))
})
PIt("Must be able to Init", func() {
Expect(w.Init()).To(Equal(true))
})
PIt("Must be able to Halt", func() {
Expect(w.Halt()).To(Equal(true))
})
})
func TestWindowStart(t *testing.T) {
t.SkipNow()
gobot.Expect(t, w.Start(), true)
}
func TestWindowHalt(t *testing.T) {
t.SkipNow()
gobot.Expect(t, w.Halt(), true)
}
func TestWindowInit(t *testing.T) {
t.SkipNow()
gobot.Expect(t, w.Init(), true)
}