summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--preproc/sauvola_test.go4
-rw-r--r--preproc/test_helpers.go4
-rw-r--r--preproc/wipesides_test.go2
3 files changed, 6 insertions, 4 deletions
diff --git a/preproc/sauvola_test.go b/preproc/sauvola_test.go
index 5582941..deefb96 100644
--- a/preproc/sauvola_test.go
+++ b/preproc/sauvola_test.go
@@ -1,6 +1,7 @@
package preproc
import (
+ "flag"
"fmt"
"image"
"image/png"
@@ -9,6 +10,9 @@ import (
)
func TestBinarization(t *testing.T) {
+ var slow = flag.Bool("slow", false, "include slow tests")
+ var update = flag.Bool("updatesauvola", false, "update golden files")
+
cases := []struct {
name string
orig string
diff --git a/preproc/test_helpers.go b/preproc/test_helpers.go
index 7579e88..20de5b1 100644
--- a/preproc/test_helpers.go
+++ b/preproc/test_helpers.go
@@ -4,16 +4,12 @@ package preproc
// TODO: test non integral img version
import (
- "flag"
"image"
"image/draw"
"image/png"
"os"
)
-var slow = flag.Bool("slow", false, "include slow tests")
-var update = flag.Bool("update", false, "update golden files")
-
func decode(s string) (*image.Gray, error) {
f, err := os.Open(s)
defer f.Close()
diff --git a/preproc/wipesides_test.go b/preproc/wipesides_test.go
index f66f39b..d5464e0 100644
--- a/preproc/wipesides_test.go
+++ b/preproc/wipesides_test.go
@@ -4,6 +4,7 @@ package preproc
// TODO: test non integral img version
import (
+ "flag"
"fmt"
"image"
"image/png"
@@ -12,6 +13,7 @@ import (
)
func TestWipeSides(t *testing.T) {
+ var update = flag.Bool("updatewipe", false, "update golden files")
cases := []struct {
name string
orig string