]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: fix name check for examples in _test package
authorKonstantin Shaposhnikov <k.shaposhnikov@gmail.com>
Mon, 27 Jun 2016 05:37:01 +0000 (13:37 +0800)
committerRob Pike <r@golang.org>
Mon, 27 Jun 2016 15:40:09 +0000 (15:40 +0000)
commite96b1ef99bdd18a6f777892008f614a4401d6655
tree18f6715be63c38f9fcc4346c9024c959ef353430
parent5f209aba6d903688fd5d801bad3fbb5572c85a02
cmd/vet: fix name check for examples in _test package

This fixes the obvious bug and makes go vet look for identifiers in foo
package when checking example names in foo_test package.

Note that for this check to work the foo package have to be
installed (using go install).

This commit however doesn't fix TestDivergentPackagesExamples test that
is not implemented correctly and passes only by chance.

Updates #16189

Change-Id: I5c2f675cd07e5b66cf0432b2b3e422ab45c3dedd
Reviewed-on: https://go-review.googlesource.com/24487
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/vet/tests.go