github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/elvish/eval/vals/kind_NOTESTGO (about)

     1  package vals
     2  
     3  import (
     4  	"os"
     5  	"testing"
     6  
     7  	"github.com/u-root/u-root/cmds/elvish/tt"
     8  )
     9  
    10  type xtype int
    11  
    12  func TestKind(t *testing.T) {
    13  	tt.Test(t, tt.Fn("Kind", Kind), tt.Table{
    14  		Args(true).Rets("bool"),
    15  		Args("").Rets("string"),
    16  		Args(EmptyList).Rets("list"),
    17  		Args(EmptyMap).Rets("map"),
    18  		Args(xtype(0)).Rets("!!vals.xtype"),
    19  
    20  		Args(NewStruct(NewStructDescriptor(), nil)).Rets("map"),
    21  		Args(NewFile(os.Stdin)).Rets("file"),
    22  		Args(NewPipe(os.Stdin, os.Stdout)).Rets("pipe"),
    23  	})
    24  }