mirror of
https://github.com/golang/go
synced 2024-11-19 16:44:43 -07:00
4ca280b5bd
specifically it uses them for the guru compatability tests This change radically increases the test coverage of the godef tests as it now works for all the jump to definition tests not just the specialized ones. Change-Id: I63547138566ac3de56344dcfddb758ed5f362a06 Reviewed-on: https://go-review.googlesource.com/c/tools/+/174937 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
278 lines
4.7 KiB
Plaintext
278 lines
4.7 KiB
Plaintext
-- A-definition --
|
|
godef/a/a.go:7:6-7: defined here as type a.A string
|
|
-- A-definition-guru --
|
|
godef/a/a.go:7:6: defined here as type a.A
|
|
|
|
-- A-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/a/a.go",
|
|
"start": {
|
|
"line": 7,
|
|
"column": 6,
|
|
"offset": 75
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 7,
|
|
"offset": 76
|
|
}
|
|
},
|
|
"description": "type a.A string"
|
|
}
|
|
|
|
-- A-hover --
|
|
type a.A string
|
|
-- AImport-definition --
|
|
godef/b/b.go:5:2-3: defined here as package a ("golang.org/x/tools/internal/lsp/godef/a")
|
|
-- AImport-definition-guru --
|
|
godef/b/b.go:5:2: defined here as package a ("golang.org/x/tools/internal/lsp/godef/a")
|
|
|
|
-- AImport-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 5,
|
|
"column": 2,
|
|
"offset": 121
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 3,
|
|
"offset": 122
|
|
}
|
|
},
|
|
"description": "package a (\"golang.org/x/tools/internal/lsp/godef/a\")"
|
|
}
|
|
|
|
-- AImport-definition-json-guru --
|
|
{
|
|
"objpos": "godef/b/b.go:5:2",
|
|
"desc": "package a (\"golang.org/x/tools/internal/lsp/godef/a\")"
|
|
}
|
|
|
|
-- AImport-hover --
|
|
package a ("golang.org/x/tools/internal/lsp/godef/a")
|
|
-- PackageFoo-definition --
|
|
foo/foo.go:1:9-12: defined here as
|
|
-- PackageFoo-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://foo/foo.go",
|
|
"start": {
|
|
"line": 1,
|
|
"column": 9,
|
|
"offset": 8
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 12,
|
|
"offset": 11
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
|
|
-- PackageFoo-hover --
|
|
|
|
-- S1-definition --
|
|
godef/b/b.go:8:6-8: defined here as type S1 struct{F1 int; S2; a.A}
|
|
-- S1-definition-guru --
|
|
godef/b/b.go:8:6: defined here as type S1
|
|
|
|
-- S1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 8,
|
|
"column": 6,
|
|
"offset": 196
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 8,
|
|
"offset": 198
|
|
}
|
|
},
|
|
"description": "type S1 struct{F1 int; S2; a.A}"
|
|
}
|
|
|
|
-- S1-hover --
|
|
type S1 struct{F1 int; S2; a.A}
|
|
-- S1F1-definition --
|
|
godef/b/b.go:9:2-4: defined here as field F1 int
|
|
-- S1F1-definition-guru --
|
|
godef/b/b.go:9:2: defined here as field F1 int
|
|
|
|
-- S1F1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 9,
|
|
"column": 2,
|
|
"offset": 215
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"column": 4,
|
|
"offset": 217
|
|
}
|
|
},
|
|
"description": "field F1 int"
|
|
}
|
|
|
|
-- S1F1-definition-json-guru --
|
|
{
|
|
"objpos": "godef/b/b.go:9:2",
|
|
"desc": "field F1 int"
|
|
}
|
|
|
|
-- S1F1-hover --
|
|
field F1 int
|
|
-- S1S2-definition --
|
|
godef/b/b.go:10:2-4: defined here as field S2 S2
|
|
-- S1S2-definition-guru --
|
|
godef/b/b.go:10:2: defined here as field S2 S2
|
|
|
|
-- S1S2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 10,
|
|
"column": 2,
|
|
"offset": 244
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 4,
|
|
"offset": 246
|
|
}
|
|
},
|
|
"description": "field S2 S2"
|
|
}
|
|
|
|
-- S1S2-definition-json-guru --
|
|
{
|
|
"objpos": "godef/b/b.go:10:2",
|
|
"desc": "field S2 S2"
|
|
}
|
|
|
|
-- S1S2-hover --
|
|
field S2 S2
|
|
-- S2-definition --
|
|
godef/b/b.go:14:6-8: defined here as type S2 struct{F1 string; F2 int; *a.A}
|
|
-- S2-definition-guru --
|
|
godef/b/b.go:14:6: defined here as type S2
|
|
|
|
-- S2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 14,
|
|
"column": 6,
|
|
"offset": 323
|
|
},
|
|
"end": {
|
|
"line": 14,
|
|
"column": 8,
|
|
"offset": 325
|
|
}
|
|
},
|
|
"description": "type S2 struct{F1 string; F2 int; *a.A}"
|
|
}
|
|
|
|
-- S2-hover --
|
|
type S2 struct{F1 string; F2 int; *a.A}
|
|
-- S2F1-definition --
|
|
godef/b/b.go:15:2-4: defined here as field F1 string
|
|
-- S2F1-definition-guru --
|
|
godef/b/b.go:15:2: defined here as field F1 string
|
|
|
|
-- S2F1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 15,
|
|
"column": 2,
|
|
"offset": 342
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"column": 4,
|
|
"offset": 344
|
|
}
|
|
},
|
|
"description": "field F1 string"
|
|
}
|
|
|
|
-- S2F1-definition-json-guru --
|
|
{
|
|
"objpos": "godef/b/b.go:15:2",
|
|
"desc": "field F1 string"
|
|
}
|
|
|
|
-- S2F1-hover --
|
|
field F1 string
|
|
-- S2F2-definition --
|
|
godef/b/b.go:16:2-4: defined here as field F2 int
|
|
-- S2F2-definition-guru --
|
|
godef/b/b.go:16:2: defined here as field F2 int
|
|
|
|
-- S2F2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 16,
|
|
"column": 2,
|
|
"offset": 375
|
|
},
|
|
"end": {
|
|
"line": 16,
|
|
"column": 4,
|
|
"offset": 377
|
|
}
|
|
},
|
|
"description": "field F2 int"
|
|
}
|
|
|
|
-- S2F2-definition-json-guru --
|
|
{
|
|
"objpos": "godef/b/b.go:16:2",
|
|
"desc": "field F2 int"
|
|
}
|
|
|
|
-- S2F2-hover --
|
|
field F2 int
|
|
-- Stuff-definition --
|
|
godef/a/a.go:9:6-11: defined here as func a.Stuff()
|
|
-- Stuff-definition-guru --
|
|
godef/a/a.go:9:6: defined here as func a.Stuff
|
|
|
|
-- Stuff-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/a/a.go",
|
|
"start": {
|
|
"line": 9,
|
|
"column": 6,
|
|
"offset": 95
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"column": 11,
|
|
"offset": 100
|
|
}
|
|
},
|
|
"description": "func a.Stuff()"
|
|
}
|
|
|
|
-- Stuff-hover --
|
|
func a.Stuff()
|