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

testing: feature request: expose the call depth when logging #6024

Closed
davecheney opened this issue Aug 3, 2013 · 1 comment
Closed

testing: feature request: expose the call depth when logging #6024

davecheney opened this issue Aug 3, 2013 · 1 comment
Milestone

Comments

@davecheney
Copy link
Contributor

What steps will reproduce the problem?

This is a feature request to expose the call depth that testing will log failures at.
Consider this code

http://play.golang.org/p/MhVJrCk2oh

What is the expected output? What do you see instead?

What we get


=== RUN TestSomething
--- FAIL: TestSomething (0.00 seconds)
        tt_test.go:8: an error
FAIL
exit status 1
FAIL    tt      0.002s

What i'd like


=== RUN TestSomething
--- FAIL: TestSomething (0.00 seconds)
        tt_test.go:16: an error
FAIL
exit status 1
FAIL    tt      0.002s

Can a method be added to testing.common to allow the the caller of Fatal/Error/Log{,f}
to specify the number of stackframes to unwind.

Please use labels and text to provide additional information.
@remyoudompheng
Copy link
Contributor

Comment 1:

Duplicate of issue #4899.

Status changed to Duplicate.

Merged into issue #4899.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants