-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexportloopref_test.go
53 lines (42 loc) · 1.34 KB
/
exportloopref_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package exportloopref_test
import (
"testing"
"github.com/kyoh86/exportloopref"
"golang.org/x/tools/go/analysis/analysistest"
)
func TestSimple(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "simple")
}
func TestStruct(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "struct")
}
func TestComplex(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "complex")
}
func TestFixed(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "fixed")
}
func TestPslice(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "pslice")
}
func TestIssue2(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "issue2")
}
func TestDeep(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "deep")
}
func TestDepPointer(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "deeppointer")
}
func TestReRef(t *testing.T) {
testdata := analysistest.TestData()
analysistest.Run(t, testdata, exportloopref.Analyzer, "reref")
}