...
1
2
3
4
5 package stdversion_test
6
7 import (
8 "path/filepath"
9 "testing"
10
11 "golang.org/x/tools/go/analysis/analysistest"
12 "golang.org/x/tools/go/analysis/passes/stdversion"
13 "golang.org/x/tools/internal/testenv"
14 "golang.org/x/tools/internal/testfiles"
15 )
16
17 func Test(t *testing.T) {
18
19
20 testenv.NeedsGo1Point(t, 22)
21
22 dir := testfiles.ExtractTxtarToTmp(t, filepath.Join(analysistest.TestData(), "test.txtar"))
23 analysistest.Run(t, dir, stdversion.Analyzer,
24 "example.com/a",
25 "example.com/sub",
26 "example.com/sub20",
27 "example.com/old")
28 }
29
View as plain text