prosper/words_test.go

23 lines
288 B
Go
Raw Normal View History

2021-02-14 02:09:56 +00:00
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()
}
}