Skip to content
This repository has been archived by the owner on Sep 1, 2018. It is now read-only.

Commit

Permalink
test: separate file tests into their own dir too
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdan committed Dec 22, 2015
1 parent 32a343f commit 01c2de0
Show file tree
Hide file tree
Showing 47 changed files with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions interfacer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ func doTestWant(t *testing.T, name, exp string, wantErr bool, args ...string) {
}

func runFileTests(t *testing.T) {
if err := os.Chdir("files"); err != nil {
t.Fatal(err)
}
defer func() {
if err := os.Chdir(".."); err != nil {
t.Fatal(err)
}
}()
paths, err := filepath.Glob("*")
if err != nil {
t.Fatal(err)
Expand All @@ -145,12 +153,6 @@ func runFileTests(t *testing.T) {
if strings.HasSuffix(p, ".out") || strings.HasSuffix(p, ".err") {
continue
}
if p == "src" {
continue
}
if !strings.HasSuffix(p, ".go") {
continue
}
doTest(t, p)
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 01c2de0

Please sign in to comment.