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>
diff --git a/go/pointer/pointer_go117_test.go b/go/pointer/pointer_go117_test.go
index 7546a06..bfaafa0 100644
--- a/go/pointer/pointer_go117_test.go
+++ b/go/pointer/pointer_go117_test.go
@@ -35,7 +35,7 @@
t.Fatalf("couldn't read file '%s': %s", filename, err)
}
- if !doOneInput(string(content), filename) {
+ if !doOneInput(t, string(content), filename) {
t.Fail()
}
}
diff --git a/go/pointer/pointer_test.go b/go/pointer/pointer_test.go
index 2f6e069..9c4a2ca 100644
--- a/go/pointer/pointer_test.go
+++ b/go/pointer/pointer_test.go
@@ -32,6 +32,7 @@
"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 @@
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 @@
continue
}
- if !doOneInput(string(content), filename) {
+ if !doOneInput(t, string(content), filename) {
ok = false
}
}