aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorRob Findley <rfindley@google.com>2021-04-14 10:52:30 -0400
committerRobert Findley <rfindley@google.com>2021-04-14 19:32:56 +0000
commit283f9fdbd340a5f3c1b27fd10730986b35e57c89 (patch)
treef5e8a09bfc0ae5fc944483a0eee1462031982e42 /src/cmd/dist
parentbcbde83c200a7abb2b23666b59992265f3cf3621 (diff)
downloadgo-283f9fdbd340a5f3c1b27fd10730986b35e57c89.tar.gz
go-283f9fdbd340a5f3c1b27fd10730986b35e57c89.zip
cmd/dist: add tests using the typeparams build tag
Now that go/ast changes have been guarded behind the typeparams build tag, we no longer have coverage for tests involving generic code. Add a new testing step to cmd/dist to run go/... and cmd/gofmt tests using -tags=typeparams. Comment out parser object resolution assertions that currently fail, and which will be fixed by CL 304456. Fixes #44933 Change-Id: I481dd4246a016f410307865b6c6c2bb3c8e6e3bc Reviewed-on: https://go-review.googlesource.com/c/go/+/310071 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index cbf3ec6d88..5ae0bf92cf 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -475,6 +475,19 @@ func (t *tester) registerTests() {
})
}
+ // Test go/... cmd/gofmt with type parameters enabled.
+ if !t.compileOnly {
+ t.tests = append(t.tests, distTest{
+ name: "tyepparams",
+ heading: "go/... and cmd/gofmt tests with tag typeparams",
+ fn: func(dt *distTest) error {
+ t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-tags=typeparams", "go/...")
+ t.addCmd(dt, "src", t.goTest(), t.timeout(300), "-tags=typeparams", "cmd/gofmt")
+ return nil
+ },
+ })
+ }
+
if t.iOS() && !t.compileOnly {
t.tests = append(t.tests, distTest{
name: "x509omitbundledroots",