func TestMain(m *testing.M) { … } func TestEndToEnd(t *testing.T) { … } // a type name for stringer. use the last component of the file name with the .go func typeName(fname string) string { … } func moreTests(t *testing.T, dirname, prefix string) []string { … } // TestTags verifies that the -tags flag works as advertised. func TestTags(t *testing.T) { … } // TestConstValueChange verifies that if a constant value changes and // the stringer code is not regenerated, we'll get a compiler error. func TestConstValueChange(t *testing.T) { … } var testfileSrcs … // Test stringer on types defined in different kinds of tests. // The generated code should not interfere between itself. func TestTestFiles(t *testing.T) { … } // The -output flag cannot be used in combiation with matching types across multiple packages. func TestCollidingOutput(t *testing.T) { … } var exe … func stringerPath(t *testing.T) string { … } // stringerCompileAndRun runs stringer for the named file and compiles and // runs the target binary in directory dir. That binary will panic if the String method is incorrect. func stringerCompileAndRun(t *testing.T, dir, stringer, typeName, fileName string) { … } // copy copies the from file to the to file. func copy(to, from string) error { … } // run runs a single command and returns an error if it does not succeed. // os/exec should have this function, to be honest. func run(t testing.TB, name string, arg ...string) error { … } // runInDir runs a single command in directory dir and returns an error if // it does not succeed. func runInDir(t testing.TB, dir, name string, arg ...string) error { … }