1
0
mirror of https://github.com/golang/go synced 2024-09-29 16:24:28 -06:00

go/types, types2: remove mechanism to exclude tests for unified build

The unified build will become the norm and the excluded tests run now.

Change-Id: I0f0873eb73483a4f04736d167d2eb796ee8a857b
Reviewed-on: https://go-review.googlesource.com/c/go/+/393438
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2022-03-16 15:17:36 -07:00
parent f2cdc6d167
commit 6be52abfa1
2 changed files with 0 additions and 36 deletions

View File

@ -25,7 +25,6 @@ package types2_test
import (
"cmd/compile/internal/syntax"
"flag"
"internal/buildcfg"
"internal/testenv"
"os"
"path/filepath"
@ -94,28 +93,11 @@ func asGoVersion(s string) string {
return ""
}
// excludedForUnifiedBuild lists files that cannot be tested
// when using the unified build's export data.
// TODO(gri) enable as soon as the unified build supports this.
var excludedForUnifiedBuild = map[string]bool{
"issue47818.go2": true,
"issue49705.go2": true,
}
func testFiles(t *testing.T, filenames []string, colDelta uint, manual bool) {
if len(filenames) == 0 {
t.Fatal("no source files")
}
if buildcfg.Experiment.Unified {
for _, f := range filenames {
if excludedForUnifiedBuild[filepath.Base(f)] {
t.Logf("%s cannot be tested with unified build - skipped", f)
return
}
}
}
var mode syntax.Mode
if strings.HasSuffix(filenames[0], ".go2") || manual {
mode |= syntax.AllowGenerics | syntax.AllowMethodTypeParams

View File

@ -31,7 +31,6 @@ import (
"go/parser"
"go/scanner"
"go/token"
"internal/buildcfg"
"internal/testenv"
"os"
"path/filepath"
@ -200,28 +199,11 @@ func asGoVersion(s string) string {
return ""
}
// excludedForUnifiedBuild lists files that cannot be tested
// when using the unified build's export data.
// TODO(gri) enable as soon as the unified build supports this.
var excludedForUnifiedBuild = map[string]bool{
"issue47818.go2": true,
"issue49705.go2": true,
}
func testFiles(t *testing.T, sizes Sizes, filenames []string, srcs [][]byte, manual bool, imp Importer) {
if len(filenames) == 0 {
t.Fatal("no source files")
}
if buildcfg.Experiment.Unified {
for _, f := range filenames {
if excludedForUnifiedBuild[filepath.Base(f)] {
t.Logf("%s cannot be tested with unified build - skipped", f)
return
}
}
}
if strings.HasSuffix(filenames[0], ".go1") {
// TODO(rfindley): re-enable this test by using GoVersion.
t.Skip("type params are enabled")