From 5d7773006a2cc1e72a37b13996b018566aab0cf8 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 14 Jan 2014 21:04:35 -0800 Subject: [PATCH] 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 --- go/exact/exact.go | 1 - go/types/stdlib_test.go | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/go/exact/exact.go b/go/exact/exact.go index 13ab2976..05662bf1 100644 --- a/go/exact/exact.go +++ b/go/exact/exact.go @@ -180,7 +180,6 @@ func MakeFromLiteral(lit string, tok token.Token) Value { } } - // TODO(gri) should we return an Unknown instead? return nil } diff --git a/go/types/stdlib_test.go b/go/types/stdlib_test.go index 5ad1f501..65ac0311 100644 --- a/go/types/stdlib_test.go +++ b/go/types/stdlib_test.go @@ -8,7 +8,6 @@ package types_test import ( - "flag" "fmt" "go/ast" "go/build" @@ -27,8 +26,6 @@ import ( . "code.google.com/p/go.tools/go/types" ) -var verbose = flag.Bool("types.v", false, "verbose mode") - var ( pkgCount int // number of packages processed start = time.Now() @@ -36,7 +33,7 @@ var ( func TestStdlib(t *testing.T) { walkDirs(t, filepath.Join(runtime.GOROOT(), "src/pkg")) - if *verbose { + if testing.Verbose() { fmt.Println(pkgCount, "packages typechecked in", time.Since(start)) } } @@ -162,7 +159,7 @@ func typecheck(t *testing.T, path string, filenames []string) { return } - if *verbose { + if testing.Verbose() { if len(files) == 0 { fmt.Println("package", file.Name.Name) }