From 31e4346e360c762ca753d162162fd6565ecb600e Mon Sep 17 00:00:00 2001 From: Ian Cottrell Date: Mon, 19 Nov 2018 11:24:30 -0500 Subject: [PATCH] go/packages/packagestest: change the Export method to take a testing.TB This allows it to be used in benchmarks as well as tests. Change-Id: I1eb7307a0a7d27c541b14dd8b84c4bc2c770f3c9 Reviewed-on: https://go-review.googlesource.com/c/150257 Run-TryBot: Ian Cottrell TryBot-Result: Gobot Gobot Reviewed-by: Rebecca Stambler --- go/packages/packagestest/export.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/packages/packagestest/export.go b/go/packages/packagestest/export.go index cb290fdd5d..4f2b3272d3 100644 --- a/go/packages/packagestest/export.go +++ b/go/packages/packagestest/export.go @@ -103,7 +103,7 @@ func TestAll(t *testing.T, f func(*testing.T, Exporter)) { // The file deletion in the cleanup can be skipped by setting the skip-cleanup // flag when invoking the test, allowing the temporary directory to be left for // debugging tests. -func Export(t *testing.T, exporter Exporter, modules []Module) *Exported { +func Export(t testing.TB, exporter Exporter, modules []Module) *Exported { t.Helper() dirname := strings.Replace(t.Name(), "/", "_", -1) dirname = strings.Replace(dirname, "#", "_", -1) // duplicate subtests get a #NNN suffix.