зеркало из https://github.com/golang/tools.git
x/tools: use internal/expect instead of go/expect
The only remaining uses of go/expect are from packagestest. Updates golang/go#70229 Change-Id: I5a8c835b761381747fbd3f936d261ed773b536e3 Reviewed-on: https://go-review.googlesource.com/c/tools/+/625919 Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Родитель
b22f1adb94
Коммит
ca2b41b3fd
|
@ -51,9 +51,6 @@ Selected packages:
|
|||
|
||||
- `go/cfg` provides a simple control-flow graph (CFG) for a Go function.
|
||||
|
||||
- `go/expect` reads Go source files used as test inputs and interprets
|
||||
special comments within them as queries or assertions for testing.
|
||||
|
||||
- `go/gcexportdata` and `go/gccgoexportdata` read and write the binary
|
||||
files containing type information used by the standard and `gccgo` compilers.
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/tools/go/expect"
|
||||
"golang.org/x/tools/go/loader"
|
||||
"golang.org/x/tools/go/ssa"
|
||||
"golang.org/x/tools/internal/expect"
|
||||
)
|
||||
|
||||
// TestGenericBodies tests that bodies of generic functions and methods containing
|
||||
|
@ -29,7 +29,7 @@ import (
|
|||
//
|
||||
// where a, b and c are the types of the arguments to the print call
|
||||
// serialized using go/types.Type.String().
|
||||
// See x/tools/go/expect for details on the syntax.
|
||||
// See x/tools/internal/expect for details on the syntax.
|
||||
func TestGenericBodies(t *testing.T) {
|
||||
for _, content := range []string{
|
||||
`
|
||||
|
|
|
@ -25,10 +25,10 @@ import (
|
|||
|
||||
"golang.org/x/sync/errgroup"
|
||||
"golang.org/x/tools/go/analysis/analysistest"
|
||||
"golang.org/x/tools/go/expect"
|
||||
"golang.org/x/tools/go/packages"
|
||||
"golang.org/x/tools/go/ssa"
|
||||
"golang.org/x/tools/go/ssa/ssautil"
|
||||
"golang.org/x/tools/internal/expect"
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"golang.org/x/tools/go/ast/astutil"
|
||||
"golang.org/x/tools/go/expect"
|
||||
"golang.org/x/tools/go/ssa"
|
||||
"golang.org/x/tools/internal/expect"
|
||||
)
|
||||
|
||||
func TestObjValueLookup(t *testing.T) {
|
||||
|
|
|
@ -267,7 +267,7 @@ func missingModuleDiagnostics(ctx context.Context, snapshot *Snapshot, pm *Parse
|
|||
// Example:
|
||||
//
|
||||
// import (
|
||||
// "golang.org/x/tools/go/expect"
|
||||
// "golang.org/x/tools/internal/expect"
|
||||
// "golang.org/x/tools/go/packages"
|
||||
// )
|
||||
// They both are related to the same module: "golang.org/x/tools".
|
||||
|
|
|
@ -10,7 +10,7 @@ Use this command to run the tests:
|
|||
|
||||
$ go test ./gopls/internal/test/marker [-update]
|
||||
|
||||
A marker test uses the '//@' marker syntax of the x/tools/go/expect package
|
||||
A marker test uses the '//@' marker syntax of the x/tools/internal/expect package
|
||||
to annotate source code with various information such as locations and
|
||||
arguments of LSP operations to be executed by the test. The syntax following
|
||||
'@' is parsed as a comma-separated list of ordinary Go function calls, for
|
||||
|
@ -277,7 +277,7 @@ The following markers are supported within marker tests:
|
|||
|
||||
# Argument conversion
|
||||
|
||||
Marker arguments are first parsed by the go/expect package, which accepts
|
||||
Marker arguments are first parsed by the internal/expect package, which accepts
|
||||
the following tokens as defined by the Go spec:
|
||||
- string, int64, float64, and rune literals
|
||||
- true and false
|
||||
|
|
|
@ -30,7 +30,6 @@ import (
|
|||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"golang.org/x/tools/go/expect"
|
||||
"golang.org/x/tools/gopls/internal/cache"
|
||||
"golang.org/x/tools/gopls/internal/debug"
|
||||
"golang.org/x/tools/gopls/internal/lsprpc"
|
||||
|
@ -42,6 +41,7 @@ import (
|
|||
"golang.org/x/tools/gopls/internal/util/safetoken"
|
||||
"golang.org/x/tools/internal/diff"
|
||||
"golang.org/x/tools/internal/diff/myers"
|
||||
"golang.org/x/tools/internal/expect"
|
||||
"golang.org/x/tools/internal/jsonrpc2"
|
||||
"golang.org/x/tools/internal/jsonrpc2/servertest"
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
|
|
|
@ -23,10 +23,10 @@ import (
|
|||
"unsafe"
|
||||
|
||||
"golang.org/x/tools/go/ast/astutil"
|
||||
"golang.org/x/tools/go/expect"
|
||||
"golang.org/x/tools/go/packages"
|
||||
"golang.org/x/tools/go/types/typeutil"
|
||||
"golang.org/x/tools/internal/diff"
|
||||
"golang.org/x/tools/internal/expect"
|
||||
"golang.org/x/tools/internal/refactor/inline"
|
||||
"golang.org/x/tools/internal/testenv"
|
||||
"golang.org/x/tools/txtar"
|
||||
|
|
Загрузка…
Ссылка в новой задаче