blob: e557d5287f35861ccfeef18ec3919f3a1db0169e (
plain)
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
|
package main
import (
"os"
"path/filepath"
"testing"
"golang.org/x/tools/go/analysis/analysistest"
)
func TestTesthelperRun(t *testing.T) {
wd, err := os.Getwd()
if err != nil {
t.Fatalf("Failed to get wd: %s", err)
}
testdata := filepath.Join(wd, "testdata")
analyzer := newTesthelperRunAnalyzer(&testhelperRunAnalyzerSettings{IncludedFunctions: []string{
"testhelper_run_not_testhelper.Run",
}})
analysistest.Run(
t,
testdata,
analyzer,
"testhelper_run_no_tests",
"testhelper_run_no_testmain",
"testhelper_run_no_exec_testmain",
"testhelper_run_not_testhelper",
)
}
|