Comparing Data Structures Slopply

2002-04-09 Thread Mark Fowler
So... In a previous thread I was talking about how eq_set() should be really called eq_bag(). Now, not that I've got too much on my plate already (see my fun todo) but I do have an itch to scratch... I'm fed up applying too much logic in my test suites. This is bad because: a) I spend too

Re: Comparing Data Structures Slopply

2002-04-09 Thread Michael G Schwern
On Tue, Apr 09, 2002 at 03:26:21PM +0100, Mark Fowler wrote: > There's a lot of other problems like that. So I was thinking of writing > Test::Sloppy (aka Test::Fuzzy, aka...) What would it do? (I can show you lots of sloppy tests if you like. :) -- Michael G. Schwern <[EMAIL PROTECTED]>

Re: Comparing Data Structures Slopply

2002-04-09 Thread Mark Fowler
On Tue, 9 Apr 2002, Michael G Schwern wrote: > On Tue, Apr 09, 2002 at 03:26:21PM +0100, Mark Fowler wrote: > > There's a lot of other problems like that. So I was thinking of writing > > Test::Sloppy (aka Test::Fuzzy, aka...) > > What would it do? > > (I can show you lots of sloppy tests if yo

Re: Comparing Data Structures Slopply

2002-04-09 Thread H.Merijn Brand
On Tue 09 Apr 2002 18:02, Mark Fowler <[EMAIL PROTECTED]> wrote: > On Tue, 9 Apr 2002, Michael G Schwern wrote: > > > On Tue, Apr 09, 2002 at 03:26:21PM +0100, Mark Fowler wrote: > > > There's a lot of other problems like that. So I was thinking of writing > > > Test::Sloppy (aka Test::Fuzzy, ak

Re: Comparing Data Structures Slopply

2002-04-09 Thread Michael G Schwern
On Tue, Apr 09, 2002 at 05:02:32PM +0100, Mark Fowler wrote: > On Tue, 9 Apr 2002, Michael G Schwern wrote: > > > On Tue, Apr 09, 2002 at 03:26:21PM +0100, Mark Fowler wrote: > > > There's a lot of other problems like that. So I was thinking of writing > > > Test::Sloppy (aka Test::Fuzzy, aka...

Test::Exception... comments?

2002-04-09 Thread Adrian Howard
Hi all, I've been refactoring a bunch of old tests with Test::More and some convenience routines for testing exceptions dropped out (along with some class base testing and mock object modules which still need cleaning up into something sane.) dies_ok BLOCK TEST_NAME Tests to see that

Re: Test::Exception... comments?

2002-04-09 Thread Michael G Schwern
On Tue, Apr 09, 2002 at 10:05:49PM +0100, Adrian Howard wrote: > Hi all, > > I've been refactoring a bunch of old tests with Test::More and some > convenience routines for testing exceptions dropped out (along with some > class base testing and mock object modules which still need cleaning up int

Re: Test::Exception... comments?

2002-04-09 Thread Curt Sampson
On Tue, 9 Apr 2002, Adrian Howard wrote: > lives_ok BLOCK TEST_NAME > Tests to see that BLOCK exits normally, and doesn't die. I'm not sure exactly what the purpose of this is; your test will still fail if it dies even when not in a lives_ok block, right? Not that I have any real ob

Re: Comparing Data Structures Slopply

2002-04-09 Thread Curt Sampson
On Tue, 9 Apr 2002, Mark Fowler wrote: > On Tue, 9 Apr 2002, Michael G Schwern wrote: > > > What would it do? > > (I can show you lots of sloppy tests if you like. :) > > Sorry, maybe it wasn't clear from the example. sort of like eq_set meets > is_deeply. Well, I think he was just being a bit

Re: Test::Exception... comments?

2002-04-09 Thread Michael G Schwern
On Wed, Apr 10, 2002 at 10:24:32AM +0900, Curt Sampson wrote: > On Tue, 9 Apr 2002, Adrian Howard wrote: > > > lives_ok BLOCK TEST_NAME > > Tests to see that BLOCK exits normally, and doesn't die. > > I'm not sure exactly what the purpose of this is; your test will > still fail if it

Re: Test::Exception... comments?

2002-04-09 Thread Adrian Howard
on 9/4/02 10:16 pm, Michael G Schwern at [EMAIL PROTECTED] wrote: [snip] > You probably want to guarantee that $@ will be how it died so you can do: > > dies_ok { div(1,0) } 'div by zero'; > like( $@, qr/^Illegal division by zero/ ); > > Even though you can use throws_ok(), the dies_ok() + $@ co