]> Cypherpunks repositories - gostls13.git/commit
cmd/go: better error for test functions with wrong signature
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 20 Feb 2016 20:36:03 +0000 (18:36 -0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 Feb 2016 17:00:30 +0000 (17:00 +0000)
commitc2d3e1123c2f49aab02260f125a940ed723e42a0
treea8b702e4ff7607e06581a749ab70ee1056be78eb
parente1035c5e878c0aae938f4ee933055d4333c5cbe5
cmd/go: better error for test functions with wrong signature

Check the function types before compiling the tests. Extend the same
approach taken by the type check used for TestMain function.

To keep existing behavior, wrong arguments for TestMain are ignored
instead of causing an error.

Fixes #14226.

Change-Id: I488a2555cddb273d35c1a8c4645bb5435c9eb91d
Reviewed-on: https://go-review.googlesource.com/19763
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/test.go