// Several tests expect the type Foo generated in some package. func expectFooString(pkg string) []byte { … } func TestMultifileStringer(t *testing.T) { … } func dirContent(t *testing.T, dir string) map[string]bool { … } // trimHeader that stringer puts in file. // It depends on location and interferes with comparing file content. func trimHeader(s []byte) []byte { … }