Skip to content

Commit

Permalink
chore: move test
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Aug 21, 2022
1 parent a49eade commit 5fe3680
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/linters_test.go
Expand Up @@ -25,6 +25,18 @@ func TestTypecheck(t *testing.T) {
testSourcesFromDir(t, filepath.Join(testdataDir, "notcompiles"))
}

func TestSourcesFromTestdataSubDir(t *testing.T) {
subDirs := []string{
"logrlint",
}

for _, dir := range subDirs {
t.Run(dir, func(t *testing.T) {
testSourcesFromDir(t, filepath.Join(testdataDir, dir))
})
}
}

func testSourcesFromDir(t *testing.T, dir string) {
t.Helper()

Expand Down Expand Up @@ -117,15 +129,3 @@ func findSources(t *testing.T, pathPatterns ...string) []string {

return sources
}

func TestSourcesFromTestdataSubDir(t *testing.T) {
subDirs := []string{
"logrlint",
}

for _, dir := range subDirs {
t.Run(dir, func(t *testing.T) {
testSourcesFromDir(t, filepath.Join(testdataDir, dir))
})
}
}

0 comments on commit 5fe3680

Please sign in to comment.