summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-03-05 14:44:17 +0000
committerNick White <git@njw.name>2020-03-05 14:44:17 +0000
commit822ce40a7d708ed44d6e638e2e25db9261254d13 (patch)
tree33af8958e18a7ff56d9d5622279d0743e3e85ad3
parente8c47ee22391bc395bc4c8001c8edde9b6eff708 (diff)
Add another top/bottom wipe testv0.1.1
-rw-r--r--testdata/1687_SCHWEITZER_0030.pngbin0 -> 111654 bytes
-rw-r--r--wipesides_test.go8
2 files changed, 5 insertions, 3 deletions
diff --git a/testdata/1687_SCHWEITZER_0030.png b/testdata/1687_SCHWEITZER_0030.png
new file mode 100644
index 0000000..49cf3f0
--- /dev/null
+++ b/testdata/1687_SCHWEITZER_0030.png
Binary files 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)