aboutsummaryrefslogtreecommitdiff
path: root/ops_test.go
blob: cd907b306eb1f92183816835750d4ae30df5d159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

import "testing"

func TestAdd(t *testing.T) {
	if !verify("+", add) {
		t.Error("add failed")
	}
}

func TestSub(t *testing.T) {
	if !verify("-", sub) {
		t.Error("sub failed")
	}
}

func TestTimes(t *testing.T) {
	if !verify("*", times) {
		t.Error("times failed")
	}
}

func TestPot(t *testing.T) {
	if !verify("^", pot) {
		t.Error("pot failed")
	}
}