go.tools/go/types: minor cleanups

- remove TODO in exact.go
- use testing.Verbose() rather than local verbose flag

R=adonovan
CC=golang-codereviews
https://golang.org/cl/52500043
This commit is contained in:
Robert Griesemer 2014-01-14 21:04:35 -08:00
parent 39fe7e6f8e
commit 5d7773006a
2 changed files with 2 additions and 6 deletions

View File

@ -180,7 +180,6 @@ func MakeFromLiteral(lit string, tok token.Token) Value {
} }
} }
// TODO(gri) should we return an Unknown instead?
return nil return nil
} }

View File

@ -8,7 +8,6 @@
package types_test package types_test
import ( import (
"flag"
"fmt" "fmt"
"go/ast" "go/ast"
"go/build" "go/build"
@ -27,8 +26,6 @@ import (
. "code.google.com/p/go.tools/go/types" . "code.google.com/p/go.tools/go/types"
) )
var verbose = flag.Bool("types.v", false, "verbose mode")
var ( var (
pkgCount int // number of packages processed pkgCount int // number of packages processed
start = time.Now() start = time.Now()
@ -36,7 +33,7 @@ var (
func TestStdlib(t *testing.T) { func TestStdlib(t *testing.T) {
walkDirs(t, filepath.Join(runtime.GOROOT(), "src/pkg")) walkDirs(t, filepath.Join(runtime.GOROOT(), "src/pkg"))
if *verbose { if testing.Verbose() {
fmt.Println(pkgCount, "packages typechecked in", time.Since(start)) fmt.Println(pkgCount, "packages typechecked in", time.Since(start))
} }
} }
@ -162,7 +159,7 @@ func typecheck(t *testing.T, path string, filenames []string) {
return return
} }
if *verbose { if testing.Verbose() {
if len(files) == 0 { if len(files) == 0 {
fmt.Println("package", file.Name.Name) fmt.Println("package", file.Name.Name)
} }