diff --git a/platforms/opencv/camera_driver_test.go b/platforms/opencv/camera_driver_test.go index 097c69c9..65286408 100644 --- a/platforms/opencv/camera_driver_test.go +++ b/platforms/opencv/camera_driver_test.go @@ -28,7 +28,7 @@ func TestCameraDriver(t *testing.T) { func TestCameraDriverStart(t *testing.T) { sem := make(chan bool) d := initTestCameraDriver() - gobottest.Assert(t, len(d.Start()), 0) + gobottest.Assert(t, d.Start(), nil) d.On(d.Event("frame"), func(data interface{}) { sem <- true }) @@ -39,13 +39,13 @@ func TestCameraDriverStart(t *testing.T) { } d = NewCameraDriver("") - gobottest.Assert(t, len(d.Start()), 0) + gobottest.Assert(t, d.Start(), nil) d = NewCameraDriver(true) - gobottest.Refute(t, len(d.Start()), 0) + gobottest.Refute(t, d.Start(), nil) } func TestCameraDriverHalt(t *testing.T) { d := initTestCameraDriver() - gobottest.Assert(t, len(d.Halt()), 0) + gobottest.Assert(t, d.Halt(), nil) } diff --git a/platforms/opencv/window_driver.go b/platforms/opencv/window_driver.go index 97a713dd..6be51fd4 100644 --- a/platforms/opencv/window_driver.go +++ b/platforms/opencv/window_driver.go @@ -31,14 +31,14 @@ func (w *WindowDriver) SetName(n string) { w.name = n } func (w *WindowDriver) Connection() gobot.Connection { return nil } // Start starts window thread and driver -func (w *WindowDriver) Start() (errs []error) { +func (w *WindowDriver) Start() (err error) { cv.StartWindowThread() w.start(w) return } // Halt returns true if camera is halted successfully -func (w *WindowDriver) Halt() (errs []error) { return } +func (w *WindowDriver) Halt() (err error) { return } // ShowImage displays image in window func (w *WindowDriver) ShowImage(image *cv.IplImage) { diff --git a/platforms/opencv/window_driver_test.go b/platforms/opencv/window_driver_test.go index 3beae5c1..bf2531a7 100644 --- a/platforms/opencv/window_driver_test.go +++ b/platforms/opencv/window_driver_test.go @@ -25,12 +25,12 @@ func TestWindowDriver(t *testing.T) { func TestWindowDriverStart(t *testing.T) { d := initTestWindowDriver() - gobottest.Assert(t, len(d.Start()), 0) + gobottest.Assert(t, d.Start(), nil) } func TestWindowDriverHalt(t *testing.T) { d := initTestWindowDriver() - gobottest.Assert(t, len(d.Halt()), 0) + gobottest.Assert(t, d.Halt(), nil) } func TestWindowDriverShowImage(t *testing.T) {