• David Lazar's avatar
    io: correctly compute call depth in test · 46ecac99
    David Lazar authored
    TestMultiReaderFlatten determines the call depth by counting PCs
    returned by runtime.Callers. With inlining, this is incorrect because
    a PC can represent multiple calls. Furthermore, runtime.Callers might
    return an additional "skip" PC, which does not represent a real call.
    This modifies the test to use CallersFrames to determine the call depth.
    Now the test passes with -l=4.
    
    Change-Id: I284f3b1e0b2d194bd08c230c616914503e5a370d
    Reviewed-on: https://go-review.googlesource.com/40990
    Run-TryBot: David Lazar <lazard@golang.org>
    Reviewed-by: 's avatarAustin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    46ecac99
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...