Skip to content

Commit

Permalink
Add missing t.Helper()
Browse files Browse the repository at this point in the history
I noticed over in cockroachdb/cockroach that test failures were printed
as originating from `datadriven.go:194` as opposed to the actual test's
invocation of `datadriven.RunTest`. Inserting the missing `t.Helper()`
call seems to have fixed that.
  • Loading branch information
tbg committed Aug 26, 2020
1 parent c9e8355 commit d0c8fd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datadriven.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func runDirectiveOrSubTest(
mandatorySubTestPrefix string,
f func(*testing.T, *TestData) string,
) {
t.Helper()
if subTestName, ok := isSubTestStart(t, r, mandatorySubTestPrefix); ok {
runSubTest(subTestName, t, r, f)
} else {
Expand Down

0 comments on commit d0c8fd6

Please sign in to comment.