We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 40e7a0c + d018227 commit a048ca8Copy full SHA for a048ca8
must/must.go
@@ -33,6 +33,7 @@ func Succeed(err error) {
33
// SucceedT is a variant of Succeed() for use in unit tests.
34
// Instead of exiting the program, any non-nil errors are reported with t.Fatal().
35
func SucceedT(t *testing.T, err error) {
36
+ t.Helper()
37
if err != nil {
38
t.Fatal(err.Error())
39
}
@@ -74,6 +75,7 @@ func ReturnT[V any](val V, err error) func(*testing.T) V {
74
75
// because filling multiple arguments using a call expression with multiple return values
76
// is only allowed when there are no other arguments.
77
return func(t *testing.T) V {
78
79
SucceedT(t, err)
80
return val
81
0 commit comments