go/src/go/parser/error_test.go

var traceErrs

const testdata

// getFile assumes that each filename occurs at most once
func getFile(fset *token.FileSet, filename string) (file *token.File) {}

func getPos(fset *token.FileSet, filename string, offset int) token.Pos {}

var errRx

// expectedErrors collects the regular expressions of ERROR comments found
// in files and returns them as a map of error positions to error messages.
func expectedErrors(fset *token.FileSet, filename string, src []byte) map[token.Pos]string {}

// compareErrors compares the map of expected error messages with the list
// of found errors and reports discrepancies.
func compareErrors(t *testing.T, fset *token.FileSet, expected map[token.Pos]string, found scanner.ErrorList) {}

func checkErrors(t *testing.T, filename string, input any, mode Mode, expectErrors bool) {}

func TestErrors(t *testing.T) {}