Skip to content

Commit

Permalink
added verbosity to test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Karrick S. McDermott committed May 13, 2019
1 parent 978bcf5 commit ed2b667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ensure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ func ensurePanic(tb testing.TB, want string, callback func()) {

// ensureNoPanic prettifies the output so one knows which test case caused a
// panic.
func ensureNoPanic(tb testing.TB, test string, callback func()) {
func ensureNoPanic(tb testing.TB, label string, callback func()) {
tb.Helper()
defer func() {
if r := recover(); r != nil {
tb.Fatalf("TEST: %s: GOT: %v", test, r)
tb.Fatalf("TEST: %s: GOT: %v", label, r)
}
}()
callback()
Expand Down

0 comments on commit ed2b667

Please sign in to comment.