Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve stack frame for mock parent method call #712

Merged
merged 1 commit into from Jan 3, 2019
Merged

Preserve stack frame for mock parent method call #712

merged 1 commit into from Jan 3, 2019

Commits on Jan 3, 2019

  1. Preserve stack frame for mock parent method call

    Go tip contains following commmit, that inlines function with single
    call bodies.
    
    golang/go@13baf4b
    
    `(*Call).On()` is the exact target for the improvement in Go repo. Due to
    the inlining, assert.CallerInfo() can't not detect the file and line
    number of the call to `(*Mock).On()` from `(*Call).On()`. Thus, the test
    fails.
    
    Adding the compiler directive `go:noinline` prevent this effect and make
    mock package works with go tip as before.
    Tai authored and letientai299 committed Jan 3, 2019
    Copy the full SHA
    d8ea802 View commit details
    Browse the repository at this point in the history