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:
parent
39fe7e6f8e
commit
5d7773006a
|
|
@ -180,7 +180,6 @@ func MakeFromLiteral(lit string, tok token.Token) Value {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(gri) should we return an Unknown instead?
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue