-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstep2_test.go
33 lines (28 loc) · 985 Bytes
/
step2_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
33
package gwizo
import (
"fmt"
"testing"
"github.com/kampsy/gwizo"
)
func TestStep2(t *testing.T) {
input := []string{
"relational", "conditional", "rational", "valenci", "hesitanci", "digitizer",
"conformabli", "radicalli", "differentli", "vileli", "analogousli",
"vietnamization", "predication", "operator", "feudalism", "decisiveness",
"hopefulness", "callousness", "formaliti", "sensitiviti", "sensibiliti",
}
stem := []string{
"relate", "condition", "rational", "valence", "hesitance", "digitize",
"conformable", "radical", "different", "vile", "analogous", "vietnamize",
"predicate", "operate", "feudal", "decisive", "hopeful", "callous",
"formal", "sensitive", "sensible",
}
for i := 0; i < len(input); i++ {
token := gwizo.Step2(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]))
}
}
}