go/pointer: skip tests that depend on an unstable API changed in Go 1.18

For golang/go#48547

Change-Id: I211239497c49b152504466dae963a68b0a4f5f6b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/351509
Trust: Bryan C. Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2021-09-22 11:14:30 -04:00
parent ecbcf3a282
commit efaec4e631
2 changed files with 7 additions and 3 deletions

View File

@ -35,7 +35,7 @@ func TestSliceToArrayPointer(t *testing.T) {
t.Fatalf("couldn't read file '%s': %s", filename, err)
}
if !doOneInput(string(content), filename) {
if !doOneInput(t, string(content), filename) {
t.Fail()
}
}

View File

@ -32,6 +32,7 @@ import (
"golang.org/x/tools/go/ssa"
"golang.org/x/tools/go/ssa/ssautil"
"golang.org/x/tools/go/types/typeutil"
"golang.org/x/tools/internal/testenv"
)
var inputs = []string{
@ -159,7 +160,10 @@ func findProbe(prog *ssa.Program, probes map[*ssa.CallCommon]bool, queries map[s
return // e.g. analysis didn't reach this call
}
func doOneInput(input, filename string) bool {
func doOneInput(t *testing.T, input, filename string) bool {
// TODO(#48547): Fix ssa.CreateTestMainPackage and unskip.
testenv.SkipAfterGo1Point(t, 17)
var conf loader.Config
// Parsing.
@ -567,7 +571,7 @@ func TestInput(t *testing.T) {
continue
}
if !doOneInput(string(content), filename) {
if !doOneInput(t, string(content), filename) {
ok = false
}
}