move debug test into _testdata

This commit is contained in:
Li Jie
2024-09-14 18:46:44 +08:00
parent 1d6eb07c62
commit 1ed798342a
8 changed files with 254 additions and 909 deletions

View File

@@ -104,7 +104,7 @@ func testBlockInfo(t *testing.T, src any, fname, expected, fn string) {
pkg := types.NewPackage(name, name)
imp := packages.NewImporter(fset)
foo, _, err := ssautil.BuildPackage(
&types.Config{Importer: imp}, fset, pkg, files, ssa.SanityCheckFunctions|ssa.InstantiateGenerics)
&types.Config{Importer: imp}, fset, pkg, files, ssa.SanityCheckFunctions|ssa.InstantiateGenerics|ssa.GlobalDebug)
if err != nil {
t.Fatal("BuildPackage failed:", err)
}