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

Comments

Projects
None yet
4 participants
@davecheney
Copy link
Contributor

commented Aug 3, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2013

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.
You can’t perform that action at this time.