diff options
author | Caleb Spare <cespare@gmail.com> | 2017-03-29 15:04:40 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-04-14 16:47:25 +0000 |
commit | bc2931372243043842161c0a60bd2f86ef9696ee (patch) | |
tree | d64c0bef02f26cde8f8ac204fb15f097627a9c65 /src/net/dial_test.go | |
parent | 6266b0f08f46de10abfb3d27748bdf1fdebcbba2 (diff) | |
download | go-git-bc2931372243043842161c0a60bd2f86ef9696ee.tar.gz |
testing: add TB.Helper to better support test helpers
This CL implements the proposal at
https://github.com/golang/proposal/blob/master/design/4899-testing-helper.md.
It's based on Josh's CL 79890043 from a few years ago:
https://codereview.appspot.com/79890043 but makes several changes,
most notably by using the new CallersFrames API so that it works with
mid-stack inlining.
Another detail came up while I was working on this: I didn't want the
user to be able to call t.Helper from inside their TestXxx function
directly (which would mean we'd print a file:line from inside the
testing package itself), so I explicitly prevented this from working.
Fixes #4899.
Change-Id: I37493edcfb63307f950442bbaf993d1589515310
Reviewed-on: https://go-review.googlesource.com/38796
Run-TryBot: Caleb Spare <cespare@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net/dial_test.go')
0 files changed, 0 insertions, 0 deletions