if found {
rx, err := regexp.Compile(pattern)
if err != nil {
- t.Errorf("%s: %v", pos, err)
+ t.Errorf("%s:%s: %v", filename, pos, err)
return
}
if match := rx.MatchString(e.Msg); !match {
- t.Errorf("%s: %q does not match %q", pos, e.Msg, pattern)
+ t.Errorf("%s:%s: %q does not match %q", filename, pos, e.Msg, pattern)
return
}
// we have a match - eliminate this error
}
}
-func TestStdLib(t *testing.T) { testStdLib(t, 0) }
-func TestStdLibGeneric(t *testing.T) { testStdLib(t, AllowGenerics) }
-
-func testStdLib(t *testing.T, mode Mode) {
+func TestStdLib(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
if debug {
fmt.Printf("parsing %s\n", filename)
}
- ast, err := ParseFile(filename, nil, nil, mode)
+ ast, err := ParseFile(filename, nil, nil, AllowGenerics)
if err != nil {
t.Error(err)
return