mirror of https://github.com/golang/go.git
go/types, types2: add FileVersions map to test Info
Make sure the FileVersions map is populated in test runs. For #62605. Change-Id: I06585b5110a4a98b577edb8e03a4981b2484a5a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/541736 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
This commit is contained in:
parent
7a6ddbb425
commit
50034e9faa
|
|
@ -197,13 +197,14 @@ func testFilesImpl(t *testing.T, filenames []string, srcs [][]byte, colDelta uin
|
|||
|
||||
// Provide Config.Info with all maps so that info recording is tested.
|
||||
info := Info{
|
||||
Types: make(map[syntax.Expr]TypeAndValue),
|
||||
Instances: make(map[*syntax.Name]Instance),
|
||||
Defs: make(map[*syntax.Name]Object),
|
||||
Uses: make(map[*syntax.Name]Object),
|
||||
Implicits: make(map[syntax.Node]Object),
|
||||
Selections: make(map[*syntax.SelectorExpr]*Selection),
|
||||
Scopes: make(map[syntax.Node]*Scope),
|
||||
Types: make(map[syntax.Expr]TypeAndValue),
|
||||
Instances: make(map[*syntax.Name]Instance),
|
||||
Defs: make(map[*syntax.Name]Object),
|
||||
Uses: make(map[*syntax.Name]Object),
|
||||
Implicits: make(map[syntax.Node]Object),
|
||||
Selections: make(map[*syntax.SelectorExpr]*Selection),
|
||||
Scopes: make(map[syntax.Node]*Scope),
|
||||
FileVersions: make(map[*syntax.PosBase]string),
|
||||
}
|
||||
|
||||
// typecheck
|
||||
|
|
|
|||
|
|
@ -213,13 +213,14 @@ func testFilesImpl(t *testing.T, filenames []string, srcs [][]byte, manual bool,
|
|||
|
||||
// Provide Config.Info with all maps so that info recording is tested.
|
||||
info := Info{
|
||||
Types: make(map[ast.Expr]TypeAndValue),
|
||||
Instances: make(map[*ast.Ident]Instance),
|
||||
Defs: make(map[*ast.Ident]Object),
|
||||
Uses: make(map[*ast.Ident]Object),
|
||||
Implicits: make(map[ast.Node]Object),
|
||||
Selections: make(map[*ast.SelectorExpr]*Selection),
|
||||
Scopes: make(map[ast.Node]*Scope),
|
||||
Types: make(map[ast.Expr]TypeAndValue),
|
||||
Instances: make(map[*ast.Ident]Instance),
|
||||
Defs: make(map[*ast.Ident]Object),
|
||||
Uses: make(map[*ast.Ident]Object),
|
||||
Implicits: make(map[ast.Node]Object),
|
||||
Selections: make(map[*ast.SelectorExpr]*Selection),
|
||||
Scopes: make(map[ast.Node]*Scope),
|
||||
FileVersions: make(map[*ast.File]string),
|
||||
}
|
||||
|
||||
// typecheck
|
||||
|
|
|
|||
Loading…
Reference in New Issue