Skip to content

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

Description

@davecheney
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.

Activity

  1. remyoudompheng commented on Aug 3, 2013

    @remyoudompheng
    Contributor

    Comment 1:

    Duplicate of issue #4899.

    Status changed to Duplicate.

    Merged into issue #4899.

  2. added this to the Go1.2 milestone on Apr 14, 2015
  3. locked and limited conversation to collaborators on Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions