]> Cypherpunks repositories - gostls13.git/commit
go/types: fix missing Importer for TestBenchmark
authorRob Findley <rfindley@google.com>
Wed, 19 Aug 2020 02:29:22 +0000 (22:29 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 27 Aug 2020 17:57:10 +0000 (17:57 +0000)
commit3b20d484fbb7a4f64881002f8a63eca42f0e7c29
treee9bc0ef28c5f0dab04e420da131e51fdf02da198
parent17ae5873833fd9a20aae123faf96f3eca9a149ea
go/types: fix missing Importer for TestBenchmark

TestBenchmark is broken due to lack of a Config.Importer, but
unfortunately fails silently due to an unchecked error.

Fix the importer and check the error. Also improve the output to include
allocation stats.

Finally, don't run TestBenchmark on go/types by default. If the
benchmark is being used during a refactoring of go/types itself, results
for go/types will not be comparable.

Change-Id: Ib6bdb6807403b3ec99762f535e2496c94bd9b6e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/249517
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/go/types/self_test.go