Skip to content

Commit

Permalink
gopls/internal/astutil: TestPurgeFuncBodies requires source code for std
Browse files Browse the repository at this point in the history
Fixes golang/go#59349

Change-Id: Ifcc743f196ffbc91f99b0bdb175673f924cbd8ba
Reviewed-on: https://go-review.googlesource.com/c/tools/+/481275
TryBot-Result: Gopher Robot <[email protected]>
gopls-CI: kokoro <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
  • Loading branch information
findleyr authored and adonovan committed Apr 3, 2023
1 parent 6520870 commit e104501
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gopls/internal/astutil/purge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import (

"golang.org/x/tools/go/packages"
"golang.org/x/tools/gopls/internal/astutil"
"golang.org/x/tools/internal/testenv"
)

// TestPurgeFuncBodies tests PurgeFuncBodies by comparing it against a
// (less efficient) reference implementation that purges after parsing.
func TestPurgeFuncBodies(t *testing.T) {
testenv.NeedsGoBuild(t) // we need the source code for std

// Load a few standard packages.
config := packages.Config{Mode: packages.NeedCompiledGoFiles}
pkgs, err := packages.Load(&config, "encoding/...")
Expand Down

0 comments on commit e104501

Please sign in to comment.