is(), undef, '' and 0 (was Re: [PATCH lib/DB.pm MANIFEST lib/DB.t] Add Tests for DB.pm)

2001-11-24 Thread Michael G Schwern
On Fri, Nov 23, 2001 at 03:32:41PM -0700, chromatic wrote: > + is( DB::DB(), undef, 'DB::DB() should return undef if $DB::ready is false'); Crap, this doesn't quite work in the general case. is( undef, undef ); # ok is( 0, undef ); # not ok is('', undef ); # o

Re: is(), undef, '' and 0 (was Re: [PATCH lib/DB.pm MANIFEST lib/DB.t] Add Tests for DB.pm)

2001-11-24 Thread chromatic
On Friday 23 November 2001 15:59, you wrote: > On Fri, Nov 23, 2001 at 03:32:41PM -0700, chromatic wrote: > > + is( DB::DB(), undef, 'DB::DB() should return undef if $DB::ready is > > false'); > > Crap, this doesn't quite work in the general case. > > is( undef, undef ); # ok > is(

[PATCH lib/DB.pm MANIFEST lib/DB.t] Add Tests for DB.pm

2001-11-24 Thread chromatic
Here's a bunch of tests for DB.pm. Some bits aren't easily testable, and there's room for someone more knowledgeable or clever to come along to improve them even more. In the process of writing these tests, I patched one little thing in DB.pm, per the comment. With the patch, all pass. -- c -

Re: is(), undef, '' and 0 (was Re: [PATCH lib/DB.pm MANIFEST lib

2001-11-24 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On 23-Nov-01 Nicholas Clark tried to scribble about: > On Fri, Nov 23, 2001 at 05:59:56PM -0500, Michael G Schwern wrote: >> Crap, this doesn't quite work in the general case. >> >> is( undef, undef ); # ok >> is( 0, undef ); # not ok