github.com/elves/elvish@v0.15.0/pkg/eval/vals/kind_test.go (about) 1 package vals 2 3 import ( 4 "os" 5 "testing" 6 7 . "github.com/elves/elvish/pkg/tt" 8 ) 9 10 type xtype int 11 12 func TestKind(t *testing.T) { 13 Test(t, Fn("Kind", Kind), Table{ 14 Args(nil).Rets("nil"), 15 Args(true).Rets("bool"), 16 Args("").Rets("string"), 17 Args(1.0).Rets("number"), 18 Args(os.Stdin).Rets("file"), 19 Args(EmptyList).Rets("list"), 20 Args(EmptyMap).Rets("map"), 21 22 Args(xtype(0)).Rets("!!vals.xtype"), 23 24 Args(os.Stdin).Rets("file"), 25 }) 26 }