Skip to content

Commit

Permalink
testing: update helperNames just before checking it
Browse files Browse the repository at this point in the history
parent's helperNames has not been set when frameSkip called, moving
helperNames initilazing to frameSkip.

Fixes golang#44887
  • Loading branch information
qingyunha committed Mar 18, 2021
1 parent 2ed2b81 commit 44b90b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/testing/testing.go
Expand Up @@ -509,6 +509,7 @@ func (c *common) frameSkip(skip int) runtime.Frame {
}
return prevFrame
}
// If more helper PCs have been added since we last did the conversion
if c.helperNames == nil {
c.helperNames = make(map[string]struct{})
for pc := range c.helperPCs {
Expand Down

0 comments on commit 44b90b2

Please sign in to comment.