prosper/words_test.go

23 lines
288 B
Go

package main
import "testing"
func TestDictionary(t *testing.T) {
d := Dictionary{}
d.AddWord("INC", nil, "1 + ")
w, err := d.GetWord("INC")
if err != nil {
t.Fail()
}
if w.Name != "INC" {
t.Fail()
}
if w.Impl != nil {
t.Fail()
}
if w.Source != "1 +" {
t.Fail()
}
}