From 822ce40a7d708ed44d6e638e2e25db9261254d13 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 5 Mar 2020 14:44:17 +0000 Subject: Add another top/bottom wipe test --- testdata/1687_SCHWEITZER_0030.png | Bin 0 -> 111654 bytes wipesides_test.go | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 testdata/1687_SCHWEITZER_0030.png diff --git a/testdata/1687_SCHWEITZER_0030.png b/testdata/1687_SCHWEITZER_0030.png new file mode 100644 index 0000000..49cf3f0 Binary files /dev/null and b/testdata/1687_SCHWEITZER_0030.png differ diff --git a/wipesides_test.go b/wipesides_test.go index 0c9eb1c..7ce3472 100644 --- a/wipesides_test.go +++ b/wipesides_test.go @@ -4,8 +4,9 @@ package preproc -// TODO: add different pages as test cases -// TODO: test non integral img version +// TODO: Integrate all test cases into one struct that has +// several different tests (horiz only, vert only, +// both) run on it. import ( "fmt" @@ -103,10 +104,11 @@ func TestWipeSides(t *testing.T) { wsize int }{ {"testdata/1727_GREENE_0048.png", 172, 237, 2204, 2244, 0.005, 120}, + {"testdata/1687_SCHWEITZER_0030.png", 142, 231, 2595, 2656, 0.005, 90}, } for _, c := range topbottomedgecases { - t.Run(fmt.Sprintf("TopBottomEdge/%s_%0.2f_%d", c.filename, c.thresh, c.wsize), func(t *testing.T) { + t.Run(fmt.Sprintf("TopBottomEdge/%s_%0.3f_%d", c.filename, c.thresh, c.wsize), func(t *testing.T) { img, err := decode(c.filename) if err != nil { t.Fatalf("Could not open file %s: %v\n", c.filename, err) -- cgit v1.2.1-24-ge1ad