aboutsummaryrefslogtreecommitdiff
path: root/internal/lsp/analysis/nonewvars/nonewvars_test.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2022-03-29 00:50:59 -0700
committerDan Willemsen <dwillemsen@google.com>2022-03-29 00:52:27 -0700
commitf10932f763d058b0dcb3acfb795c869996fef47b (patch)
tree7e04d345c214f3efac3c4b86c7ec3e831c500437 /internal/lsp/analysis/nonewvars/nonewvars_test.go
parentd6d1ab63f7e2d16fb9a1f1d29755d12da90aa0bb (diff)
parente693fb417253d14786976bd29a456961aa8b6343 (diff)
downloadgolang-x-tools-f10932f763d058b0dcb3acfb795c869996fef47b.tar.gz
Merge commit 'e693fb417253d14786976bd29a456961aa8b6343'
Change-Id: I65e50880732e718fa2264e47ef7cc19e37cc2f05
Diffstat (limited to 'internal/lsp/analysis/nonewvars/nonewvars_test.go')
-rw-r--r--internal/lsp/analysis/nonewvars/nonewvars_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/lsp/analysis/nonewvars/nonewvars_test.go b/internal/lsp/analysis/nonewvars/nonewvars_test.go
index 3983bc523..dc58ab0ff 100644
--- a/internal/lsp/analysis/nonewvars/nonewvars_test.go
+++ b/internal/lsp/analysis/nonewvars/nonewvars_test.go
@@ -9,9 +9,14 @@ import (
"golang.org/x/tools/go/analysis/analysistest"
"golang.org/x/tools/internal/lsp/analysis/nonewvars"
+ "golang.org/x/tools/internal/typeparams"
)
func Test(t *testing.T) {
testdata := analysistest.TestData()
- analysistest.RunWithSuggestedFixes(t, testdata, nonewvars.Analyzer, "a")
+ tests := []string{"a"}
+ if typeparams.Enabled {
+ tests = append(tests, "typeparams")
+ }
+ analysistest.RunWithSuggestedFixes(t, testdata, nonewvars.Analyzer, tests...)
}