On 7/19/06, Fergal Daly <[EMAIL PROTECTED]> wrote:
On 19/07/06, chromatic <[EMAIL PROTECTED]> wrote: > On Wednesday 19 July 2006 06:03, demerphq wrote: > > > Excuse me? Where did I say the code was "broken"? > > Wasn't that the implication when you said you've seen misleading line numbers > many times? > > > use Test::More tests => 3; > > > > sub my_ok { > > ok($_[0],$_[1]); > > } > > I don't know why you'd expect this to report the right line numbers; this code > really *is* broken.What's wrong with that code? It doesn't do anything useful right now but you can't argue that a system that stops being useful when you use subroutines is good.
Hear, hear!
If Test::Builder gave a stack trace rather than a single line number then this wouldn't be broken,
Yes that would improve things for cases like my_ok(). And i like the idea you posted elsewhere about showing a stack trace only of the stuff above where it currently does. However I dont see how it would help in the case of data driven tests in a loop. For those the best policy IMO is still to provide a description. Which is why i wanted it mandatory, or at the least, harder to avoid than it currently is. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
