зеркало из https://github.com/golang/tools.git
cmd/guru: fix and reenable failing test case
And avoid assumptions about the contents of the standard hash/fnv package. Change-Id: I10cc95ac6e3b482da5b027d68ff218d08f425e89 Reviewed-on: https://go-review.googlesource.com/40870 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
2a4809d2cb
Коммит
25abe5b322
|
@ -225,7 +225,7 @@ func TestGuru(t *testing.T) {
|
|||
"testdata/src/freevars/main.go",
|
||||
"testdata/src/implements/main.go",
|
||||
"testdata/src/implements-methods/main.go",
|
||||
// "testdata/src/imports/main.go", // disabled until golang.org/issue/19464 is fixed
|
||||
"testdata/src/imports/main.go",
|
||||
"testdata/src/peers/main.go",
|
||||
"testdata/src/pointsto/main.go",
|
||||
"testdata/src/referrers/main.go",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"hash/fnv" // @describe ref-pkg-import2 "fnv"
|
||||
"lib" // @describe ref-pkg-import "lib"
|
||||
"lib" // @describe ref-pkg-import "lib"
|
||||
"lib/sublib" // @describe ref-pkg-import2 "sublib"
|
||||
)
|
||||
|
||||
// Tests that import another package. (To make the tests run quickly,
|
||||
|
@ -25,5 +25,5 @@ func main() {
|
|||
|
||||
var _ lib.Type // @describe ref-pkg "lib"
|
||||
|
||||
fnv.New32()
|
||||
_ = sublib.C
|
||||
}
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
-------- @describe ref-pkg-import2 --------
|
||||
import of package "hash/fnv"
|
||||
func New32 func() hash.Hash32
|
||||
func New32a func() hash.Hash32
|
||||
func New64 func() hash.Hash64
|
||||
func New64a func() hash.Hash64
|
||||
|
||||
-------- @describe ref-pkg-import --------
|
||||
import of package "lib"
|
||||
const Const untyped int = 3
|
||||
|
@ -18,6 +11,10 @@ import of package "lib"
|
|||
method (Type) Method(x *int) *int
|
||||
var Var int
|
||||
|
||||
-------- @describe ref-pkg-import2 --------
|
||||
import of package "lib/sublib"
|
||||
const C untyped int = 0
|
||||
|
||||
-------- @describe ref-const --------
|
||||
reference to const lib.Const untyped int of value 3
|
||||
defined here
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package sublib
|
||||
|
||||
const C = 0
|
Загрузка…
Ссылка в новой задаче