go/types, types2: rename testfile suffixes from .go2 to .go

We don't need the distinction anymore.
Also, made corresponding adjustments to check_test.go.

Change-Id: I3c9a768c16a251d76bc6b3ebabd37822773e4ef5
Reviewed-on: https://go-review.googlesource.com/c/go/+/393657
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Robert Griesemer 2022-03-17 16:46:18 -07:00
parent 101d14e3b3
commit 82b810f79c
284 changed files with 6 additions and 19 deletions

View file

@ -135,13 +135,7 @@ func testFiles(t *testing.T, filenames []string, colDelta uint, manual bool) {
t.Fatal(err)
}
// TODO(gri) remove this or use flag mechanism to set mode if still needed
var mode syntax.Mode
if strings.HasSuffix(filenames[0], ".go2") || manual {
mode |= syntax.AllowGenerics | syntax.AllowMethodTypeParams
}
// parse files and collect parser errors
files, errlist := parseFiles(t, filenames, mode)
files, errlist := parseFiles(t, filenames, syntax.AllowGenerics|syntax.AllowMethodTypeParams)
pkgName := "<no package>"
if len(files) > 0 {
@ -271,7 +265,7 @@ func testFiles(t *testing.T, filenames []string, colDelta uint, manual bool) {
//
// go test -run Manual -- foo.go bar.go
//
// If no source arguments are provided, the file testdata/manual.go2
// If no source arguments are provided, the file testdata/manual.go
// is used instead.
// Provide the -verify flag to verify errors against ERROR comments
// in the input files rather than having a list of errors reported.
@ -282,7 +276,7 @@ func TestManual(t *testing.T) {
filenames := flag.Args()
if len(filenames) == 0 {
filenames = []string{filepath.FromSlash("testdata/manual.go2")}
filenames = []string{filepath.FromSlash("testdata/manual.go")}
}
info, err := os.Stat(filenames[0])

Some files were not shown because too many files have changed in this diff Show more