"testing"
)
-
const testDir = "./testdata" // location of test packages
var fset = token.NewFileSet()
trace = flag.Bool("trace", false, "print package names")
)
-
// ERROR comments must be of the form /* ERROR "rx" */ and rx is
// a regular expression that matches the expected error message.
var errRx = regexp.MustCompile(`^/\* *ERROR *"([^"]*)" *\*/$`)
return
}
-
func testFilter(f *os.FileInfo) bool {
return strings.HasSuffix(f.Name, ".src") && f.Name[0] != '.'
}
-
func checkError(t *testing.T, expected, found *scanner.Error) {
rx, err := regexp.Compile(expected.Msg)
if err != nil {
}
}
-
func TestTypeCheck(t *testing.T) {
flag.Parse()
pkgRx, err := regexp.Compile(*pkgPat)