github.com/jxskiss/gopkg@v0.17.3/internal/linkname/compile_test.go (about) 1 package linkname 2 3 import ( 4 "reflect" 5 "testing" 6 ) 7 8 func TestCompile(t *testing.T) { 9 compileReflectFunctions() 10 compileRuntimeFunctions() 11 } 12 13 // call helps to ensure the linked functions can build. 14 func call(f interface{}) { 15 defer func() { 16 recover() 17 }() 18 reflect.ValueOf(f).Call([]reflect.Value{}) 19 }