Skip to content

Commit af67b9d

Browse files
committed
go/ssa: migrate source_test.go away from loader
Also changes buildPackage to return a *packages.Package. buildPackage no longer builds dependencies. For golang/go#69556 Change-Id: Id10ccee131394cda657213124907949a0b82f903 Reviewed-on: https://go-review.googlesource.com/c/tools/+/614116 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 3bb0ed7 commit af67b9d

File tree

6 files changed

+106
-169
lines changed

6 files changed

+106
-169
lines changed

go/ssa/builder_generic_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,11 @@ func TestGenericBodies(t *testing.T) {
519519
pkgname := parsePackageClause(t, content)
520520
t.Run(pkgname, func(t *testing.T) {
521521
t.Parallel()
522-
ssapkg, f := buildPackage(t, content, ssa.SanityCheckFunctions)
522+
ssapkg, ppkg := buildPackage(t, content, ssa.SanityCheckFunctions)
523523
fset := ssapkg.Prog.Fset
524524

525525
// Collect all notes in f, i.e. comments starting with "//@ types".
526-
notes, err := expect.ExtractGo(fset, f)
526+
notes, err := expect.ExtractGo(fset, ppkg.Syntax[0])
527527
if err != nil {
528528
t.Errorf("expect.ExtractGo: %v", err)
529529
}

0 commit comments

Comments
 (0)