Skip to content

Commit

Permalink
Update dictionary_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jorelosorio committed Mar 19, 2022
1 parent bba0f81 commit fe4c9d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dictionary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
)

func newDictionary(t *testing.T) *Dictionary {
func newTestDictionary(t *testing.T) *Dictionary {
currentPath, err := os.Getwd()
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -43,7 +43,7 @@ func TestTrainDictionary(t *testing.T) {

textFilePath := path.Join(currentPath, "examples", "test_sample1.txt")

dic := newDictionary(t)
dic := newTestDictionary(t)
dic.TrainFromTextFile(textFilePath)

if len(dic.Words) != 2 {
Expand All @@ -59,7 +59,7 @@ func TestTrainDictionaryWithWrongText(t *testing.T) {

textFilePath := path.Join(currentPath, "examples", "wrong.txt")

dic := newDictionary(t)
dic := newTestDictionary(t)
err = dic.TrainFromTextFile(textFilePath)

if err == nil {
Expand Down

0 comments on commit fe4c9d9

Please sign in to comment.