@@ -305,7 +305,10 @@ func TestPersianAnalyzerVerbs(t *testing.T) {
305305 t .Fatal (err )
306306 }
307307 for _ , test := range tests {
308- actual := analyzer .Analyze (test .input )
308+ actual , err := analysis .AnalyzeForTokens (analyzer , test .input )
309+ if err != nil {
310+ t .Fatalf ("error analyzing input: %v" , err )
311+ }
309312 if len (actual ) != len (test .output ) {
310313 t .Fatalf ("expected length: %d, got %d" , len (test .output ), len (actual ))
311314 }
@@ -600,7 +603,10 @@ func TestPersianAnalyzerVerbsDefective(t *testing.T) {
600603 t .Fatal (err )
601604 }
602605 for _ , test := range tests {
603- actual := analyzer .Analyze (test .input )
606+ actual , err := analysis .AnalyzeForTokens (analyzer , test .input )
607+ if err != nil {
608+ t .Fatalf ("error analyzing input: %v" , err )
609+ }
604610 if len (actual ) != len (test .output ) {
605611 t .Fatalf ("expected length: %d, got %d" , len (test .output ), len (actual ))
606612 }
@@ -671,7 +677,10 @@ func TestPersianAnalyzerOthers(t *testing.T) {
671677 t .Fatal (err )
672678 }
673679 for _ , test := range tests {
674- actual := analyzer .Analyze (test .input )
680+ actual , err := analysis .AnalyzeForTokens (analyzer , test .input )
681+ if err != nil {
682+ t .Fatalf ("error analyzing input: %v" , err )
683+ }
675684 if len (actual ) != len (test .output ) {
676685 t .Fatalf ("expected length: %d, got %d" , len (test .output ), len (actual ))
677686 }
0 commit comments