is(), undef and is_cmp()

2001-12-12 Thread Michael G Schwern
I'm implementing is_cmp() inside Test::Builder and I figured it would be nice if is_eq, is_num, isnt_eq and isnt_num all just went through that. And thus Test::More's is() and isnt(). This would mean is($got, $expect) becomes is_cmp($got, 'eq', $expect) and isnt() becomes is_cmp($got, 'ne', $exp

Test::Builder: Multiple test libraries in one test.

2001-12-12 Thread Michael G Schwern
Authors of Test modules, listen up. I've never quite properly described the purpose of Test::Builder. Mostly its come off as a way to tweak Test::More's behavior a little or to implement your own Test::More-ish library. It does that, but that's not what's really neat. And I only just realized t

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Michael G Schwern
On Wed, Dec 12, 2001 at 10:53:28PM -0500, Barrie Slaymaker wrote: > > Oooh, pretty. Beats the hell out of is_deeply. > > Only for "table" structured data. Since older Data::Dumpers don't sort > hash keys, and I haven't integrated the Data::Dumper like code I have > elsewhere, it isn't gener

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
On Wed, Dec 12, 2001 at 08:54:51PM -0500, Michael G Schwern wrote: > On Wed, Dec 12, 2001 at 04:38:20PM -0500, Barrie Slaymaker wrote: > > I've written a Test::Differences[1] that outputs things like: > > > > not ok 5 > > # Failed test 5 in blib/lib/Test/Differences.pm at line 221 fail #4

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Michael G Schwern
On Wed, Dec 12, 2001 at 04:38:20PM -0500, Barrie Slaymaker wrote: > I've written a Test::Differences[1] that outputs things like: > > not ok 5 > # Failed test 5 in blib/lib/Test/Differences.pm at line 221 fail #4 *TODO* > # +-+--+ > # | Got | Expected | > # +-+

Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
I've written a Test::Differences[1] that outputs things like: not ok 5 # Failed test 5 in blib/lib/Test/Differences.pm at line 221 fail #4 *TODO* # +-+--+ # | Got | Expected | # +-+--+ # | a\n | a\n | # >x* b\n < # | c\n | c\n