github.com/nyan233/littlerpc@v0.4.6-0.20230316182519-0c8d5c48abaf/internal/reflect/identity_test.go (about)

     1  package reflect
     2  
     3  import "testing"
     4  
     5  // 测试类型识别系列函数
     6  func TestTypeIdentify(t *testing.T) {
     7  	_, tLen := IdentifyTypeNoInfo(uint64(0))
     8  	if tLen != 8 {
     9  		t.Fatal("identify type failed")
    10  	}
    11  	arrayT := IdentArrayOrSliceType(*new([]byte))
    12  	_ = arrayT.(byte)
    13  	_ = IdentArrayOrSliceType(nil)
    14  }