Skip to content

Commit

Permalink
Rename test dirs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed May 18, 2020
1 parent 145dbc5 commit e82fa8b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ Top level comment should end in a period: math/math.go:3:1
```

See more examples in test files:
- [for default mode](testdata/default/check/main.go)
- [for using --all flag](testdata/checkall/check/main.go)
- [for default mode](testdata/default/in/main.go)
- [for using --all flag](testdata/checkall/in/main.go)
16 changes: 8 additions & 8 deletions godot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func TestMakeReplacement(t *testing.T) {

func TestRunIntegration(t *testing.T) {
t.Run("default check", func(t *testing.T) {
var testFile = filepath.Join("testdata", "default", "check", "main.go")
var testFile = filepath.Join("testdata", "default", "in", "main.go")
expected, err := readTestFile(testFile)
if err != nil {
t.Fatalf("Failed to read test file %s: %v", testFile, err)
Expand All @@ -365,7 +365,7 @@ func TestRunIntegration(t *testing.T) {
})

t.Run("check all", func(t *testing.T) {
var testFile = filepath.Join("testdata", "checkall", "check", "main.go")
var testFile = filepath.Join("testdata", "checkall", "in", "main.go")
expected, err := readTestFile(testFile)
if err != nil {
t.Fatalf("Failed to read test file %s: %v", testFile, err)
Expand Down Expand Up @@ -396,11 +396,11 @@ func TestRunIntegration(t *testing.T) {

func TestFixIntegration(t *testing.T) {
t.Run("default check", func(t *testing.T) {
var testFile = filepath.Join("testdata", "default", "check", "main.go")
var expectedFile = filepath.Join("testdata", "default", "result", "main.go")
var testFile = filepath.Join("testdata", "default", "in", "main.go")
var expectedFile = filepath.Join("testdata", "default", "out", "main.go")
expected, err := ioutil.ReadFile(expectedFile) // nolint: gosec
if err != nil {
t.Fatalf("Failed to read test file %s: %v", expected, err)
t.Fatalf("Failed to read test file %s: %v", expectedFile, err)
}

fset := token.NewFileSet()
Expand Down Expand Up @@ -432,11 +432,11 @@ func TestFixIntegration(t *testing.T) {
})

t.Run("check all", func(t *testing.T) {
var testFile = filepath.Join("testdata", "checkall", "check", "main.go")
var expectedFile = filepath.Join("testdata", "checkall", "result", "main.go")
var testFile = filepath.Join("testdata", "checkall", "in", "main.go")
var expectedFile = filepath.Join("testdata", "checkall", "out", "main.go")
expected, err := ioutil.ReadFile(expectedFile) // nolint: gosec
if err != nil {
t.Fatalf("Failed to read test file %s: %v", expected, err)
t.Fatalf("Failed to read test file %s: %v", expectedFile, err)
}

fset := token.NewFileSet()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e82fa8b

Please sign in to comment.