1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:24:41 -07:00
go/internal/lsp/testdata/rename/testy/testy_test.go.golden
Ian Cottrell ae58c0ff6b internal/lsp: remove filename print from rename output
This prevents piping back to the file, a common pattern.
Multi file forms should use the unified diff.

Change-Id: I1ea140c59de24feb74a64b0cb41890536f23cd3a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/197157
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-25 16:47:12 +00:00

64 lines
1.1 KiB
Plaintext

-- b-d-rename --
--- rename/testy/testy.go.orig
+++ rename/testy/testy.go
@@ -2,6 +2,6 @@
type tt int //@rename("tt", "testyType")
-func a() {
+func b() {
foo := 42 //@rename("foo", "bar")
}
--- rename/testy/testy_test.go.orig
+++ rename/testy/testy_test.go
@@ -4,5 +4,5 @@
func TestSomething(t *testing.T) {
var x int //@rename("x", "testyX")
- a() //@rename("a", "b")
+ b() //@rename("a", "b")
}
-- b-rename --
testy.go:
package testy
type tt int //@rename("tt", "testyType")
func b() {
foo := 42 //@rename("foo", "bar")
}
testy_test.go:
package testy
import "testing"
func TestSomething(t *testing.T) {
var x int //@rename("x", "testyX")
b() //@rename("a", "b")
}
-- testyX-d-rename --
--- rename/testy/testy_test.go.orig
+++ rename/testy/testy_test.go
@@ -3,6 +3,6 @@
import "testing"
func TestSomething(t *testing.T) {
- var x int //@rename("x", "testyX")
+ var testyX int //@rename("x", "testyX")
a() //@rename("a", "b")
}
-- testyX-rename --
package testy
import "testing"
func TestSomething(t *testing.T) {
var testyX int //@rename("x", "testyX")
a() //@rename("a", "b")
}