On Mon, Feb 11, 2002 at 01:06:28AM +0000, Mark Fowler wrote:
> On Mon, 4 Feb 2002, Michael G Schwern wrote:
> 
> > Hmmmm... I thought about the no_ending() problem and basically you
> > need to be able to access the internal list of test results and muck
> > with it to erase the results of the captured tests.
> > 
> > I'll put something in for that.
> 
> Excellent, that shouldn't be to difficult to add in T::B::T.  This
> shouldn't change the API, and it'd make most sense to check what version
> of Test::Builder they have installed and frob the internal list if we can,
> otherwise just default to calling no_ending.  Of course, if you distribute
> it with Test::Builder then we don't need to do that (as we know they have 
> a capable T::B) 
> 
> Speaking of that, I was wondering if you're going to distribute 
> Test::Builder::Tester with Test::Builder, then it might make more sense 
> that you take over maintenance of the module from that point on (so that 
> everything is maintained and checked from one position.)

Oh goody, more work. ;)

I've got to think a bit about how I'm going to make the internal
results accessable.


> Anyway, meanwhile, I've been working on my test suite for GD images, and
> this means that I've got to try out Test::Builder::Tester a bit more.
> 
> I soon got tired of having to manually insert line numbers into text I'm
> passing to test_err, so I've added an extra function to
> Test::Builder::Tester called line_num that (via caller) simply returns
> what line you called from plus an offset.  i.e.
> 
>     test_out("not ok 1 - foo");
>     test_err("#     Failed test ($0 at line ".line_num(+1).")");
>     fail("foo");
>     test_test("fail works");
> 
> This is now available at the same URL as before....
> 
>   http://2shortplanks.com/temp/tbt/
> 
> If there's a better way of doing this then let me know.
> 
> Finally, speaking of the standard error messages that Test::Builder
> prints out:  How stable are these?  

Most of them are pretty stable, with the possible exception of
can_ok().  There's no guarantee they won't change, though.


> If T::B::T is testing for them then
> it might make sense to have a function that does something like
> 
>     test_out("not ok 1 - foo");
>     test_err(fail_line(+1))
>     fail("foo");
>     test_test("fail works");
> 
> This way if you ever change the message Test::Builder prints out for
> a standard line failure, all the test frameworks built with T::B::T
> won't break.
> 
> Oh look, it's 1am again and I'm babbling.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Do you actually think about what you are saying or is it an improvisational 
game of Mad Libs that you play in your head?

Reply via email to