diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-11-15 18:35:58 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-11-27 23:48:19 +0000 |
| commit | 0a9d6c1f9f9938cdd0edbb0f97ba0917d52e4c0d (patch) | |
| tree | d388f5b4a4780bf399fa5b1cdb0b5e25153b5e35 /git-codereview/pending_test.go | |
| parent | 0d52c016f0bb80623e0ce00bf4e92981bacf862e (diff) | |
| download | go-x-review-0a9d6c1f9f9938cdd0edbb0f97ba0917d52e4c0d.tar.xz | |
git-codereview: fix test compilation error on Go 1.8
These tests depended on Go 1.9's t.Helper.
Change-Id: Ib8196e24f8508b4b2891cd1467dd9954bc5d8de5
Reviewed-on: https://go-review.googlesource.com/77932
Reviewed-by: Dominik Honnef <dominik@honnef.co>
Diffstat (limited to 'git-codereview/pending_test.go')
| -rw-r--r-- | git-codereview/pending_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git-codereview/pending_test.go b/git-codereview/pending_test.go index e29d0eb..025fb5b 100644 --- a/git-codereview/pending_test.go +++ b/git-codereview/pending_test.go @@ -14,6 +14,9 @@ import ( "testing" ) +// setHelper calls t.Helper() for Go 1.9+ (see go19_test.go) and does nothing otherwise. +var setHelper = func(t *testing.T) {} + func TestPendingNone(t *testing.T) { gt := newGitTest(t) defer gt.done() @@ -496,12 +499,12 @@ func testPendingReply(srv *gerritServer, id, rev, status string) { } func testPending(t *testing.T, want string) { - t.Helper() + setHelper(t) testPendingArgs(t, nil, want) } func testPendingArgs(t *testing.T, args []string, want string) { - t.Helper() + setHelper(t) // fake auth information to avoid Gerrit error if auth.host == "" { auth.host = "gerrit.fake" |
