cl: _testdata/importpkg

This commit is contained in:
xushiwei
2024-04-22 20:09:23 +08:00
parent 2d75c55d36
commit 72084b5648
8 changed files with 212 additions and 79 deletions

View File

@@ -35,7 +35,7 @@ import (
)
func TestFromTestdata(t *testing.T) {
testFromDir(t, "", "./_testdata")
testFromDir(t, "importpkg", "./_testdata")
}
func init() {
@@ -97,7 +97,7 @@ func testCompileEx(t *testing.T, src any, fname, expected string) {
}
foo.WriteTo(os.Stderr)
prog := llssa.NewProgram(nil)
ret, err := NewPackage(prog, &GoPackage{SSA: foo, Files: files})
ret, err := NewPackage(prog, fset, foo, files)
if err != nil {
t.Fatal("cl.NewPackage failed:", err)
}