var haltOnError … var verifyErrors … func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode syntax.Mode) ([]*syntax.File, []error) { … } func unpackError(err error) (syntax.Pos, string) { … } // absDiff returns the absolute difference between x and y. func absDiff(x, y uint) uint { … } // parseFlags parses flags from the first line of the given source if the line // starts with "//" (line comment) followed by "-" (possibly with spaces // between). Otherwise the line is ignored. func parseFlags(src []byte, flags *flag.FlagSet) error { … } // testFiles type-checks the package consisting of the given files, and // compares the resulting errors with the ERROR annotations in the source. // Except for manual tests, each package is type-checked twice, once without // use of Alias types, and once with Alias types. // // The srcs slice contains the file content for the files named in the // filenames slice. The colDelta parameter specifies the tolerance for position // mismatch when comparing errors. The manual parameter specifies whether this // is a 'manual' test. // // If provided, opts may be used to mutate the Config before type-checking. func testFiles(t *testing.T, filenames []string, srcs [][]byte, colDelta uint, manual bool, opts ...func(*Config)) { … } func testFilesImpl(t *testing.T, filenames []string, srcs [][]byte, colDelta uint, manual bool, opts ...func(*Config)) { … } // boolFieldAddr(conf, name) returns the address of the boolean field conf.<name>. // For accessing unexported fields. func boolFieldAddr(conf *Config, name string) *bool { … } // setGOEXPERIMENT overwrites the existing buildcfg.Experiment with a new one // based on the provided goexperiment string. Calling the result function // (typically via defer), reverts buildcfg.Experiment to the prior value. // For testing use, only. func setGOEXPERIMENT(goexperiment string) func() { … } // TestManual is for manual testing of a package - either provided // as a list of filenames belonging to the package, or a directory // name containing the package files - after the test arguments // (and a separating "--"). For instance, to test the package made // of the files foo.go and bar.go, use: // // go test -run Manual -- foo.go bar.go // // If no source arguments are provided, the file testdata/manual.go // is used instead. // Provide the -verify flag to verify errors against ERROR comments // in the input files rather than having a list of errors reported. // The accepted Go language version can be controlled with the -lang // flag. func TestManual(t *testing.T) { … } func TestLongConstants(t *testing.T) { … } func withSizes(sizes Sizes) func(*Config) { … } // TestIndexRepresentability tests that constant index operands must // be representable as int even if they already have a type that can // represent larger values. func TestIndexRepresentability(t *testing.T) { … } func TestIssue47243_TypedRHS(t *testing.T) { … } func TestCheck(t *testing.T) { … } func TestSpec(t *testing.T) { … } func TestExamples(t *testing.T) { … } func TestFixedbugs(t *testing.T) { … } func TestLocal(t *testing.T) { … } func testDirFiles(t *testing.T, dir string, colDelta uint, manual bool) { … } func testDir(t *testing.T, dir string, colDelta uint, manual bool) { … } func testPkg(t *testing.T, filenames []string, colDelta uint, manual bool) { … }