26 lines
828 B
Go
26 lines
828 B
Go
package nmslib
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestTranslate(t *testing.T) {
|
|
kor2eng := Translate{Lang: "korvax"}
|
|
if kor2eng.ToEng("Alinichel") != "Emergency" {
|
|
t.Errorf("\nTesting Translate{Lang: \"korvax\"}.ToEng(\"Alinichel\"): got %q, want: %q.\n", kor2eng.ToEng("Alinichel"), "Emergency")
|
|
} else {
|
|
fmt.Printf("\nTesting Translate{Lang: \"korvax\"}.ToEng(\"Alinichel\"): got %q, want: %q.\n", kor2eng.ToEng("Alinichel"), "Emergency")
|
|
}
|
|
|
|
vyk2eng := Translate{"vykeen"}
|
|
if vyk2eng.ToEng("Aqo") != "Foes" {
|
|
t.Errorf("Testing Translate{Lang: \"vykeen\"}.ToEng(\"Aqo\"): got %q, want: %q.\n", vyk2eng.ToEng("Aqo"), "Foes")
|
|
} else {
|
|
fmt.Printf("Testing Translate{Lang: \"vykeen\"}.ToEng(\"Aqo\"): got %q, want: %q.\n", vyk2eng.ToEng("Aqo"), "Foes")
|
|
}
|
|
|
|
CleanUp()
|
|
fmt.Printf("\nTesting complete.\nStatus: ")
|
|
}
|