From 6be52abfa1aea30b33c1e2db27ea92e954661aa4 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 16 Mar 2022 15:17:36 -0700 Subject: [PATCH] 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 Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/types2/check_test.go | 18 ------------------ src/go/types/check_test.go | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/src/cmd/compile/internal/types2/check_test.go b/src/cmd/compile/internal/types2/check_test.go index 7efa512164..5d491a3e16 100644 --- a/src/cmd/compile/internal/types2/check_test.go +++ b/src/cmd/compile/internal/types2/check_test.go @@ -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 diff --git a/src/go/types/check_test.go b/src/go/types/check_test.go index 81ea81ca4e..b96158a660 100644 --- a/src/go/types/check_test.go +++ b/src/go/types/check_test.go @@ -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")