]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vet: clean up the test
authorRob Pike <r@golang.org>
Wed, 24 Apr 2013 17:40:29 +0000 (10:40 -0700)
committerRob Pike <r@golang.org>
Wed, 24 Apr 2013 17:40:29 +0000 (10:40 -0700)
- 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

src/cmd/vet/Makefile
src/cmd/vet/test_buildtag_bad.go [moved from src/cmd/vet/buildtag_bad.go with 72% similarity]

index 45bd29170c80d375e7cdfa9bf5a735a686cb0943..67c7e199744e9cce478a83cc007e880570b482f8 100644 (file)
@@ -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
similarity index 72%
rename from src/cmd/vet/buildtag_bad.go
rename to src/cmd/vet/test_buildtag_bad.go
index 4dca6a443da9891d3bba7af36f4b2a36a5a145eb..0a0a39bd1f744649a545927d33258f4e674b5bba 100644 (file)
@@ -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.