Skip to content

Commit e104501

Browse files
findleyradonovan
authored andcommitted
gopls/internal/astutil: TestPurgeFuncBodies requires source code for std
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]>
1 parent 6520870 commit e104501

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gopls/internal/astutil/purge_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ import (
1414

1515
"golang.org/x/tools/go/packages"
1616
"golang.org/x/tools/gopls/internal/astutil"
17+
"golang.org/x/tools/internal/testenv"
1718
)
1819

1920
// TestPurgeFuncBodies tests PurgeFuncBodies by comparing it against a
2021
// (less efficient) reference implementation that purges after parsing.
2122
func TestPurgeFuncBodies(t *testing.T) {
23+
testenv.NeedsGoBuild(t) // we need the source code for std
24+
2225
// Load a few standard packages.
2326
config := packages.Config{Mode: packages.NeedCompiledGoFiles}
2427
pkgs, err := packages.Load(&config, "encoding/...")

0 commit comments

Comments
 (0)