aboutsummaryrefslogtreecommitdiff
path: root/verify.go
diff options
context:
space:
mode:
Diffstat (limited to 'verify.go')
-rw-r--r--verify.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/verify.go b/verify.go
index 9403e50..b5337e1 100644
--- a/verify.go
+++ b/verify.go
@@ -35,8 +35,8 @@ var cases = map[string]testCase{
order: false,
},
"^": testCase{
- function: Pot,
- expect: expectPot,
+ function: Pow,
+ expect: expectPow,
maxm: 10,
maxn: 3,
order: false,
@@ -63,9 +63,9 @@ func verify(op string) (string, bool) {
}
e := c.expect(m, n)
- me := Scan(m)
- ne := Scan(n)
- ee := Scan(e)
+ me := Index(m)
+ ne := Index(n)
+ ee := Index(e)
re := c.function(me, ne)
return fmt.Sprint(me, op, ne, "=", re), re.Equals(ee)
@@ -73,7 +73,7 @@ func verify(op string) (string, bool) {
func expectAdd(m, n int) int { return m + n }
func expectMul(m, n int) int { return m * n }
-func expectPot(m, n int) int { return int(math.Pow(float64(m), float64(n))) }
+func expectPow(m, n int) int { return int(math.Pow(float64(m), float64(n))) }
func expectSub(m, n int) int { return m - n }
func verifyAll() {