import (
"cmd/compile/internal/syntax"
"flag"
- "internal/buildcfg"
"internal/testenv"
"os"
"path/filepath"
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
"go/parser"
"go/scanner"
"go/token"
- "internal/buildcfg"
"internal/testenv"
"os"
"path/filepath"
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")