Skip to content

Commit

Permalink
add more test code
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Jun 30, 2020
1 parent 17af0e0 commit 211f676
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phrase/paragraph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ func TestParagraph(t *testing.T) {
}

func TestPinyin(t *testing.T) {
seg := gse.New()
seg := gse.New("zh, ../examples/dict.txt")
WithGse(seg)
p := Pinyin("西雅图太空针")
tt.Equal(t, "[xi ya tu tai kong zhen]", p)

AddDict("都会区", "dū huì qū")
p := Pinyin("西雅图都会区, 西雅图太空针")
tt.Equal(t, "[xi ya tu du hui qu, xi ya tu tai kong zhen]", p)
}

0 comments on commit 211f676

Please sign in to comment.