You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These invalid names are intentionally chosen. Not sure what we should do here.
// TestisNotATest is not a test function, despite appearances.//// Please ignore any lint or vet warnings for this function.funcTestisNotATest(t*testing.T) {
panic("This is not a valid test function.")
}
Interesting. Maybe we can set the x/playground repo to run with GOFLAGS=-vet=off (or some flag to just disable the -tests check, if possible)? Or move those not-a-test functions to testdata?
For the tests of ill-formed Test functions in GOROOT, I added -vet=off to the go test commands as needed. Unfortunately in this case the design of the test mixes the (sound) test harness and the (invalid) code under test in the same source file. Really the latter code should be split into a separate file beneath testdata (as @cherrymui said). Unfortunately that's not a quick fix.
It started to fail consistently since CL 603476 (on the main repo).
E.g. https://ci.chromium.org/ui/p/golang/builders/ci/x_playground-gotip-linux-amd64/b8738967458806380001/overview
https://logs.chromium.org/logs/golang/buildbucket/cr-buildbucket/8738967458806380001/+/u/step/18/log/2
Apparently some tests need fix to make the new vet happy.
cc @adonovan @toothrot
The text was updated successfully, but these errors were encountered: