1
0
mirror of https://github.com/golang/go synced 2024-11-19 07:34:44 -07:00
go/internal/lsp/testdata/rename/crosspkg/crosspkg.go.golden
Michael Matloob 4191b8cbba internal/lsp/testadata/rename: add a test case for renames across packages
Renames across packages works as of https://golang.org/cl/206883.
Add a test for it.

Fixes golang/go#32877

Change-Id: I234fafe95a1060c0ca8d03462bf7b2c241d59e4a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207264
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-11-14 22:24:11 +00:00

41 lines
549 B
Plaintext

-- Dolphin-rename --
crosspkg.go:
package crosspkg
func Dolphin() { //@rename("Foo", "Dolphin")
}
var Bar int //@rename("Bar", "Tomato")
other.go:
package other
import "golang.org/x/tools/internal/lsp/rename/crosspkg"
func Other() {
crosspkg.Bar
crosspkg.Dolphin()
}
-- Tomato-rename --
crosspkg.go:
package crosspkg
func Foo() { //@rename("Foo", "Dolphin")
}
var Tomato int //@rename("Bar", "Tomato")
other.go:
package other
import "golang.org/x/tools/internal/lsp/rename/crosspkg"
func Other() {
crosspkg.Tomato
crosspkg.Foo()
}