]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] test: fix and update run.go's generics testing
authorMatthew Dempsky <mdempsky@google.com>
Tue, 25 May 2021 21:06:56 +0000 (14:06 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 25 May 2021 23:31:05 +0000 (23:31 +0000)
commit6c9e1c58bc7661638ee084e40a3b6fc907825496
tree3263997284ed3d634b32f039f601cc68b33a5b5c
parent5c1e119d48657d60519ee1d0940d0725c06bf85d
[dev.typeparams] test: fix and update run.go's generics testing

In a late change to golang.org/cl/320609, while going back and forth
on the meaning of the boolean result value for "checkFlags", I got one
of the cases wrong. As a result, rather than testing both default
flags and -G=3, we were (redundanly) testing default flags and -G=0.

I ran into this because in my local dev tree, I'm using types2 even
for -G=0, and evidently one of the recent types2 CLs changed the error
message in fixedbugs/issue10975.go. Fortunately, there haven't been
any other regressions despite lacking test coverage.

So this CL cleans things up a bit:

1. Fixes that test to use -lang=go1.17, so types2 reports the old
error message again.

2. Renames "checkFlags" to "validForGLevel" so the boolean result is
harder to get wrong.

3. Removes the blanket deny list of all -m tests, and instead adds the
specific tests that are still failing. This effectively extends -G=3
coverage to another 27 tests that were using -m but already passing,
so we can make sure they don't regress again.

4. Adds a -f flag to force running tests even if they're in the deny
list, to make it easier to test whether they're still failing without
having to edit run.go.

Change-Id: I058d9d90d81a92189e54c6f591d95fb617fede53
Reviewed-on: https://go-review.googlesource.com/c/go/+/322612
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
test/fixedbugs/issue10975.go
test/run.go