diff --git a/check/license_test.go b/check/license_test.go index de2c978..daf296f 100644 --- a/check/license_test.go +++ b/check/license_test.go @@ -3,7 +3,7 @@ package check import "testing" func TestPercentage(t *testing.T) { - g := License{"testfiles", []string{}} + g := License{"testdata/testfiles", []string{}} p, _, err := g.Percentage() if err != nil { t.Fatal(err) diff --git a/check/testfiles/Godeps/a.go b/check/testdata/testfiles/Godeps/a.go similarity index 100% rename from check/testfiles/Godeps/a.go rename to check/testdata/testfiles/Godeps/a.go diff --git a/check/testfiles/Godeps/b.go b/check/testdata/testfiles/Godeps/b.go similarity index 100% rename from check/testfiles/Godeps/b.go rename to check/testdata/testfiles/Godeps/b.go diff --git a/check/testfiles/Godeps/c.go b/check/testdata/testfiles/Godeps/c.go similarity index 100% rename from check/testfiles/Godeps/c.go rename to check/testdata/testfiles/Godeps/c.go diff --git a/check/testfiles/LICENCE.txt b/check/testdata/testfiles/LICENCE.txt similarity index 100% rename from check/testfiles/LICENCE.txt rename to check/testdata/testfiles/LICENCE.txt diff --git a/check/testfiles/a.go b/check/testdata/testfiles/a.go similarity index 100% rename from check/testfiles/a.go rename to check/testdata/testfiles/a.go diff --git a/check/testfiles/a.pb.go b/check/testdata/testfiles/a.pb.go similarity index 100% rename from check/testfiles/a.pb.go rename to check/testdata/testfiles/a.pb.go diff --git a/check/testfiles/a.pb.gw.go b/check/testdata/testfiles/a.pb.gw.go similarity index 100% rename from check/testfiles/a.pb.gw.go rename to check/testdata/testfiles/a.pb.gw.go diff --git a/check/testfiles/b.go b/check/testdata/testfiles/b.go similarity index 100% rename from check/testfiles/b.go rename to check/testdata/testfiles/b.go diff --git a/check/testfiles/c.go b/check/testdata/testfiles/c.go similarity index 100% rename from check/testfiles/c.go rename to check/testdata/testfiles/c.go diff --git a/check/testfiles/d.go b/check/testdata/testfiles/d.go similarity index 100% rename from check/testfiles/d.go rename to check/testdata/testfiles/d.go diff --git a/check/testfiles/testdata/a.go b/check/testdata/testfiles/testdata/a.go similarity index 100% rename from check/testfiles/testdata/a.go rename to check/testdata/testfiles/testdata/a.go diff --git a/check/testfiles/third_party/a.go b/check/testdata/testfiles/third_party/a.go similarity index 100% rename from check/testfiles/third_party/a.go rename to check/testdata/testfiles/third_party/a.go diff --git a/check/testfiles/third_party/b.go b/check/testdata/testfiles/third_party/b.go similarity index 100% rename from check/testfiles/third_party/b.go rename to check/testdata/testfiles/third_party/b.go diff --git a/check/testfiles/third_party/c.go b/check/testdata/testfiles/third_party/c.go similarity index 100% rename from check/testfiles/third_party/c.go rename to check/testdata/testfiles/third_party/c.go diff --git a/check/testfiles/vendor/a.go b/check/testdata/testfiles/vendor/a.go similarity index 100% rename from check/testfiles/vendor/a.go rename to check/testdata/testfiles/vendor/a.go diff --git a/check/testfiles/vendor/b.go b/check/testdata/testfiles/vendor/b.go similarity index 100% rename from check/testfiles/vendor/b.go rename to check/testdata/testfiles/vendor/b.go diff --git a/check/testfiles/vendor/c.go b/check/testdata/testfiles/vendor/c.go similarity index 100% rename from check/testfiles/vendor/c.go rename to check/testdata/testfiles/vendor/c.go diff --git a/check/utils_test.go b/check/utils_test.go index 5b94458..bcadb59 100644 --- a/check/utils_test.go +++ b/check/utils_test.go @@ -6,18 +6,18 @@ import ( ) func TestGoFiles(t *testing.T) { - files, skipped, err := GoFiles("testfiles/") + files, skipped, err := GoFiles("testdata/testfiles/") if err != nil { t.Fatal(err) } - want := []string{"testfiles/a.go", "testfiles/b.go", "testfiles/c.go", "testfiles/d.go"} + want := []string{"testdata/testfiles/a.go", "testdata/testfiles/b.go", "testdata/testfiles/c.go", "testdata/testfiles/d.go"} if !reflect.DeepEqual(files, want) { - t.Errorf("GoFiles(%q) = %v, want %v", "testfiles/", files, want) + t.Errorf("GoFiles(%q) = %v, want %v", "testdata/testfiles/", files, want) } - wantSkipped := []string{"testfiles/a.pb.go", "testfiles/a.pb.gw.go"} + wantSkipped := []string{"testdata/testfiles/a.pb.go", "testdata/testfiles/a.pb.gw.go"} if !reflect.DeepEqual(skipped, wantSkipped) { - t.Errorf("GoFiles(%q) skipped = %v, want %v", "testfiles/", skipped, wantSkipped) + t.Errorf("GoFiles(%q) skipped = %v, want %v", "testdata/testfiles/", skipped, wantSkipped) } } @@ -30,16 +30,16 @@ var goToolTests = []struct { failed []FileSummary wantErr bool }{ - {"go vet", "testfiles", []string{"testfiles/a.go", "testfiles/b.go", "testfiles/c.go"}, []string{"go", "vet"}, 1, []FileSummary{}, false}, + {"go vet", "testdata/testfiles", []string{"testdata/testfiles/a.go", "testdata/testfiles/b.go", "testdata/testfiles/c.go"}, []string{"go", "vet"}, 1, []FileSummary{}, false}, { "staticcheck", - "testfiles/", - []string{"testfiles/a.go", "testfiles/b.go", "testfiles/c.go", "testfiles/d.go"}, + "testdata/testfiles/", + []string{"testdata/testfiles/a.go", "testdata/testfiles/b.go", "testdata/testfiles/c.go", "testdata/testfiles/d.go"}, []string{"staticcheck", "./..."}, 0.75, []FileSummary{ { - Filename: "testfiles/d.go", FileURL: "", + Filename: "testdata/testfiles/d.go", FileURL: "", Errors: []Error{ {LineNumber: 8, ErrorString: " func foo is unused (U1000)"}, {LineNumber: 10, ErrorString: " should use time.Until instead of t.Sub(time.Now()) (S1024)"}},