Skip to content

Commit

Permalink
fix: mark harness methods as helpers (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernot-dev authored Oct 26, 2021
1 parent 8085c05 commit dcfbd50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/test_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ type TestReporter struct {
}

func (r *TestReporter) Error(args ...interface{}) {
r.T.Helper()
r.T.Error(args...)
}

func (r *TestReporter) Fail() {
r.T.Helper()
r.T.Fail()
}

func (r *TestReporter) FailNow() {
r.T.Helper()
r.T.FailNow()
}

Expand All @@ -32,6 +35,7 @@ func (r *TestReporter) Failed() bool {
}

func (r *TestReporter) Fatal(args ...interface{}) {
r.T.Helper()
r.T.Fatal(args...)
}

Expand Down Expand Up @@ -72,11 +76,13 @@ func (r *TestReporter) Helper() {
}

func (r *TestReporter) Fatalf(format string, args ...interface{}) {
r.T.Helper()
r.Log(fmt.Sprintf(format, args...))
r.T.Fail()
os.Exit(1)
}

func (r *TestReporter) Errorf(format string, args ...interface{}) {
r.T.Helper()
r.T.Errorf(format, args...)
}

0 comments on commit dcfbd50

Please sign in to comment.