aboutsummaryrefslogtreecommitdiff
path: root/verify.go
diff options
context:
space:
mode:
Diffstat (limited to 'verify.go')
-rw-r--r--verify.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/verify.go b/verify.go
index cedfd98..0212391 100644
--- a/verify.go
+++ b/verify.go
@@ -15,7 +15,7 @@ func init() {
}
// verify perfoms tests
-func verify(op string, f function) {
+func verify(op string, f function) bool {
var mm, nn, rr int
switch op {
case "+":
@@ -42,8 +42,9 @@ func verify(op string, f function) {
n := scan(nn)
r := f(m, n)
expected := scan(rr)
- fmt.Println(m.Value, op, n.Value, "=", r.Value,
- r.Value == expected.Value)
+ ok := r.Value == expected.Value
+ fmt.Println(m.Value, op, n.Value, "=", r.Value, ok)
+ return ok
}
func verifyAll() {