Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions must/must.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func Succeed(err error) {
// SucceedT is a variant of Succeed() for use in unit tests.
// Instead of exiting the program, any non-nil errors are reported with t.Fatal().
func SucceedT(t *testing.T, err error) {
t.Helper()
if err != nil {
t.Fatal(err.Error())
}
Expand Down Expand Up @@ -74,6 +75,7 @@ func ReturnT[V any](val V, err error) func(*testing.T) V {
// because filling multiple arguments using a call expression with multiple return values
// is only allowed when there are no other arguments.
return func(t *testing.T) V {
t.Helper()
SucceedT(t, err)
return val
}
Expand Down
Loading