Skip to content

Commit

Permalink
catch errors from generate
Browse files Browse the repository at this point in the history
  • Loading branch information
marhaupe committed Aug 10, 2019
1 parent b2faa4f commit 0a7cd61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ func TestFiles(t *testing.T) {

input := readFile(filename)
expected := readFile(filename + expectedSuffix)
actual := generate(input)
actual, err := generate(input)
if err != nil {
t.Errorf("Test resulted in error. Filename: %v, Error: %v", filename, err)
}

formatExpectedBytes, _ := format.Source([]byte(expected))
formatActualBytes, _ := format.Source([]byte(actual))
Expand Down

0 comments on commit 0a7cd61

Please sign in to comment.