1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-29 13:49:14 +08:00
Marc-Antoine Ruel 88addd428f Add crude travis check for gofmt; format all sources
The check ensures no gofmt regression occurs. Formatting the code makes everyone happy.
2017-03-27 14:10:37 -04:00

19 lines
449 B
Go

package opencv
import (
"path"
"runtime"
"testing"
cv "github.com/lazywei/go-opencv/opencv"
"gobot.io/x/gobot/gobottest"
)
func TestUtils(t *testing.T) {
_, currentfile, _, _ := runtime.Caller(0)
image := cv.LoadImage(path.Join(path.Dir(currentfile), "lena-256x256.jpg"))
rect := DetectFaces("haarcascade_frontalface_alt.xml", image)
gobottest.Refute(t, len(rect), 0)
gobottest.Refute(t, DrawRectangles(image, rect, 0, 0, 0, 0), nil)
}