From 41abf458640394dcdf63e874e75b5e06aebd0214 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 24 Jul 2020 18:36:05 +0100 Subject: Fix failing tests; happily the test was just not correctly written --- wipesides_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wipesides_test.go b/wipesides_test.go index c6ff711..8aa68ff 100644 --- a/wipesides_test.go +++ b/wipesides_test.go @@ -117,8 +117,12 @@ func TestWipeSides(t *testing.T) { t.Fatalf("Could not open file %s: %v\n", c.filename, err) } b := img.Bounds() + gray := image.NewGray(b) + draw.Draw(gray, b, img, b.Min, draw.Src) + rotimg := sideways(img) + b = rotimg.Bounds() intImg := integralimg.NewImage(b) - draw.Draw(intImg, b, img, b.Min, draw.Src) + draw.Draw(intImg, b, rotimg, b.Min, draw.Src) topedge, bottomedge := findedges(*intImg, c.wsize, c.thresh) if topedge < c.mintop { t.Errorf("Top edge %d < minimum %d", topedge, c.mintop) -- cgit v1.2.1-24-ge1ad