-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstep4_test.go
32 lines (27 loc) · 882 Bytes
/
step4_test.go
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
28
29
30
31
32
package gwizo
import (
"fmt"
"testing"
"github.com/kampsy/gwizo"
)
func TestStep4(t *testing.T) {
input := []string{
"revival", "allowance", "inference", "airliner", "gyroscopic", "adjustable",
"defensible", "irritant", "replacement", "adjustment", "dependent",
"adoption", "homologou", "communism", "activate", "angulariti", "homologous",
"effective", "bowdlerize",
}
stem := []string{
"reviv", "allow", "infer", "airlin", "gyroscop", "adjust", "defens",
"irrit", "replac", "adjust", "depend", "adopt", "homolog", "commun", "activ",
"angular", "homolog", "effect", "bowdler",
}
for i := 0; i < len(input); i++ {
token := gwizo.Step4(input[i])
if token != stem[i] {
t.Errorf(fmt.Sprintf("Test For %s -FAIL- [%s != %s]", input[i], token, stem[i]))
} else {
t.Log(fmt.Sprintf("Test For %s *PASS* [%s == %s]", input[i], token, stem[i]))
}
}
}