var gorootTestTests … var testdataTests … func init() { … } func run(t *testing.T, input string, goroot string) { … } // makeGoroot copies testdata/src into the "src" directory of a temporary // location to mimic GOROOT/src, and adds a file "runtime/consts.go" containing // declarations for GOOS and GOARCH that match the GOOS and GOARCH of this test. // // It returns the directory that should be used for GOROOT. func makeGoroot(t *testing.T) string { … } // TestTestdataFiles runs the interpreter on testdata/*.go. func TestTestdataFiles(t *testing.T) { … } // TestGorootTest runs the interpreter on $GOROOT/test/*.go. func TestGorootTest(t *testing.T) { … } func TestTypeparamTest(t *testing.T) { … }