aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-04-24 10:40:29 -0700
committerRob Pike <r@golang.org>2013-04-24 10:40:29 -0700
commit2c5e477f4820484d85704cdada35e814e3926be9 (patch)
tree8727ae3aa546661668c78988d9a1f47687264c0f
parent578dc3a96ce6649b021ee437e089af3a205dff82 (diff)
downloadgo-2c5e477f4820484d85704cdada35e814e3926be9.tar.gz
go-2c5e477f4820484d85704cdada35e814e3926be9.zip
cmd/vet: clean up the test
- clean up the notypes version of the test so it's quiet - change the package in the buildtag test to avoid confusing godoc R=golang-dev, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/8671049
-rw-r--r--src/cmd/vet/Makefile6
-rw-r--r--src/cmd/vet/test_buildtag_bad.go (renamed from src/cmd/vet/buildtag_bad.go)6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/cmd/vet/Makefile b/src/cmd/vet/Makefile
index 45bd29170c..67c7e19974 100644
--- a/src/cmd/vet/Makefile
+++ b/src/cmd/vet/Makefile
@@ -5,8 +5,10 @@
# Assumes go/types is installed
test testshort:
go build -tags 'vet_test gotypes'
- ../../../test/errchk ./vet -printfuncs='Warn:1,Warnf:1' *.go *.s
+ ../../../test/errchk ./vet -printfuncs='Warn:1,Warnf:1' test_*.go test_*.s
test_notypes:
go build -tags 'vet_test'
- ../../../test/errchk ./vet -printfuncs='Warn:1,Warnf:1' *.go *.s
+ # Only those tests that do not depend on types.
+ # Excluded: test_print.go
+ ../../../test/errchk ./vet -printfuncs='Warn:1,Warnf:1' test_asm.go test_assign.go test_atomic.go test_buildtag.go test_buildtag_bad.go test_deadcode.go test_method.go test_rangeloop.go test_structtag.go test_taglit.go test_*.s
diff --git a/src/cmd/vet/buildtag_bad.go b/src/cmd/vet/test_buildtag_bad.go
index 4dca6a443d..0a0a39bd1f 100644
--- a/src/cmd/vet/buildtag_bad.go
+++ b/src/cmd/vet/test_buildtag_bad.go
@@ -8,4 +8,8 @@
// +build @#$ // ERROR "invalid non-alphanumeric build constraint"
// +build toolate // ERROR "build comment appears too late in file"
-package main
+package bad
+
+// This is package 'bad' rather than 'main' so the erroneous build
+// tag doesn't end up looking like a package doc for the vet command
+// when examined by godoc.