Skip to content

Commit a8e7c0c

Browse files
myitcvfindleyr
authored andcommitted
internal/lsp: move gopls/internal/regtest -> internal/lsp/regtest
Note: this only moves the regtest framework, not the gopls regtest tests. Change-Id: Ia70d2e97df8a8bd48a042e5b037c1e56a210b594 Reviewed-on: https://go-review.googlesource.com/c/tools/+/312412 Trust: Paul Jolly <[email protected]> Run-TryBot: Paul Jolly <[email protected]> gopls-CI: kokoro <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent f946a15 commit a8e7c0c

31 files changed

+45
-35
lines changed

gopls/internal/regtest/bench/bench_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ import (
99
"fmt"
1010
"testing"
1111

12-
. "golang.org/x/tools/gopls/internal/regtest"
12+
"golang.org/x/tools/gopls/internal/hooks"
13+
. "golang.org/x/tools/internal/lsp/regtest"
1314

1415
"golang.org/x/tools/internal/lsp/protocol"
1516
)
1617

1718
func TestMain(m *testing.M) {
18-
Main(m)
19+
Main(m, hooks.Options)
1920
}
2021

2122
func printBenchmarkResults(result testing.BenchmarkResult) {

gopls/internal/regtest/bench/completion_bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"strings"
1212
"testing"
1313

14-
. "golang.org/x/tools/gopls/internal/regtest"
14+
. "golang.org/x/tools/internal/lsp/regtest"
1515

1616
"golang.org/x/tools/internal/lsp/fake"
1717
)

gopls/internal/regtest/bench/stress_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"testing"
1212
"time"
1313

14-
. "golang.org/x/tools/gopls/internal/regtest"
14+
. "golang.org/x/tools/internal/lsp/regtest"
1515
)
1616

1717
// Pilosa is a repository that has historically caused significant memory

gopls/internal/regtest/codelens/codelens_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
"testing"
1111
"time"
1212

13-
. "golang.org/x/tools/gopls/internal/regtest"
13+
"golang.org/x/tools/gopls/internal/hooks"
14+
. "golang.org/x/tools/internal/lsp/regtest"
1415

1516
"golang.org/x/tools/internal/lsp/command"
1617
"golang.org/x/tools/internal/lsp/fake"
@@ -20,7 +21,7 @@ import (
2021
)
2122

2223
func TestMain(m *testing.M) {
23-
Main(m)
24+
Main(m, hooks.Options)
2425
}
2526

2627
func TestDisablingCodeLens(t *testing.T) {

gopls/internal/regtest/completion/completion_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ import (
99
"strings"
1010
"testing"
1111

12-
. "golang.org/x/tools/gopls/internal/regtest"
12+
"golang.org/x/tools/gopls/internal/hooks"
13+
. "golang.org/x/tools/internal/lsp/regtest"
1314

1415
"golang.org/x/tools/internal/lsp/fake"
1516
"golang.org/x/tools/internal/lsp/protocol"
1617
"golang.org/x/tools/internal/testenv"
1718
)
1819

1920
func TestMain(m *testing.M) {
20-
Main(m)
21+
Main(m, hooks.Options)
2122
}
2223

2324
const proxy = `

gopls/internal/regtest/completion/postfix_snippet_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99
"testing"
1010

11-
. "golang.org/x/tools/gopls/internal/regtest"
11+
. "golang.org/x/tools/internal/lsp/regtest"
1212
"golang.org/x/tools/internal/lsp/source"
1313
)
1414

gopls/internal/regtest/diagnostics/diagnostics_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
"log"
1111
"testing"
1212

13-
. "golang.org/x/tools/gopls/internal/regtest"
13+
"golang.org/x/tools/gopls/internal/hooks"
14+
. "golang.org/x/tools/internal/lsp/regtest"
1415

1516
"golang.org/x/tools/internal/lsp"
1617
"golang.org/x/tools/internal/lsp/fake"
@@ -19,7 +20,7 @@ import (
1920
)
2021

2122
func TestMain(m *testing.M) {
22-
Main(m)
23+
Main(m, hooks.Options)
2324
}
2425

2526
// Use mod.com for all go.mod files due to golang/go#35230.

gopls/internal/regtest/misc/configuration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package misc
77
import (
88
"testing"
99

10-
. "golang.org/x/tools/gopls/internal/regtest"
10+
. "golang.org/x/tools/internal/lsp/regtest"
1111

1212
"golang.org/x/tools/internal/lsp/fake"
1313
"golang.org/x/tools/internal/testenv"

gopls/internal/regtest/misc/definition_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"testing"
1111

12-
. "golang.org/x/tools/gopls/internal/regtest"
12+
. "golang.org/x/tools/internal/lsp/regtest"
1313

1414
"golang.org/x/tools/internal/lsp/fake"
1515
"golang.org/x/tools/internal/lsp/tests"

gopls/internal/regtest/misc/embed_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package misc
66
import (
77
"testing"
88

9-
. "golang.org/x/tools/gopls/internal/regtest"
9+
. "golang.org/x/tools/internal/lsp/regtest"
1010
"golang.org/x/tools/internal/testenv"
1111
)
1212

0 commit comments

Comments
 (0)