diff options
Diffstat (limited to 'StemmerRu/stemmer_test.go')
-rw-r--r-- | StemmerRu/stemmer_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/StemmerRu/stemmer_test.go b/StemmerRu/stemmer_test.go deleted file mode 100644 index 018c6e3..0000000 --- a/StemmerRu/stemmer_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package StemmerRu - -import ( - "testing" - "io/ioutil" - "encoding/json" - "path" -) - -var testFile = path.Join(`..`, `tests.json`) - -func TestStemWord(t *testing.T) { - file, err := ioutil.ReadFile(testFile) - if err != nil { - t.Error("Can't open file", testFile) - } - tests := &map[string]string{} - err = json.Unmarshal(file, tests) - if err != nil { - t.Error("Can't parse json", err) - } - for source, expected := range *tests { - result := StemWord(source); - if expected != result { - t.Errorf(`Expected "%s" (source: %s) but got "%s"`, result, source, result) - } - } -} |