internal/lsp/tests: use NeedsGo1Point

Clean up a stray use of build tags rather than testenv.

Change-Id: Id645b4f6af1f770a47ea8ff3f0d16b14f25976c2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/256360
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
diff --git a/internal/lsp/tests/tests.go b/internal/lsp/tests/tests.go
index 65a3a48..8f899ad 100644
--- a/internal/lsp/tests/tests.go
+++ b/internal/lsp/tests/tests.go
@@ -243,10 +243,6 @@
 	o.ExperimentalWorkspaceModule = true
 }
 
-var (
-	go115 = false
-)
-
 // Load creates the folder structure required when testing with modules.
 // The directory structure of a test needs to look like the example below:
 //
@@ -473,8 +469,8 @@
 					if strings.Contains(t.Name(), "cgo") {
 						testenv.NeedsTool(t, "cgo")
 					}
-					if !go115 && strings.Contains(t.Name(), "declarecgo") {
-						t.Skip("test requires Go 1.15")
+					if strings.Contains(t.Name(), "declarecgo") {
+						testenv.NeedsGo1Point(t, 15)
 					}
 					test(t, src, e, data.CompletionItems)
 				})
@@ -658,8 +654,8 @@
 				if strings.Contains(t.Name(), "cgo") {
 					testenv.NeedsTool(t, "cgo")
 				}
-				if !go115 && strings.Contains(t.Name(), "declarecgo") {
-					t.Skip("test requires Go 1.15")
+				if strings.Contains(t.Name(), "declarecgo") {
+					testenv.NeedsGo1Point(t, 15)
 				}
 				tests.Definition(t, spn, d)
 			})
diff --git a/internal/lsp/tests/tests_go115.go b/internal/lsp/tests/tests_go115.go
deleted file mode 100644
index 6c5f9bb..0000000
--- a/internal/lsp/tests/tests_go115.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build go1.15
-
-package tests
-
-func init() {
-	go115 = true
-}