From: rkinyon Date: Tue, 21 Feb 2006 19:58:56 +0000 (+0000) Subject: Marked two tests as passing that were TODO X-Git-Tag: 0-97~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d0856836d1a4f0dd7fbf6ab123d7e2c3fb13dad;p=dbsrgits%2FDBM-Deep.git Marked two tests as passing that were TODO --- diff --git a/Changes b/Changes index 2e52d9c..cb8fe90 100644 --- a/Changes +++ b/Changes @@ -26,6 +26,7 @@ Revision history for DBM::Deep. "eval { $obj->isa( 'DBM::Deep' ) }". - The various methods like push and delete now have the same return values as the standard builtins. + - TIEARRAY and TIEHASH now check their parameters more thoroughly 0.96 Oct 14 09:55:00 2005 Pacific - Fixed build (OS X hidden files killed it) diff --git a/t/21_tie_access.t b/t/21_tie_access.t index 64339b0..60d420a 100644 --- a/t/21_tie_access.t +++ b/t/21_tie_access.t @@ -31,24 +31,19 @@ unlink "t/test.db"; ok( exists $hash{key1}, "... and it's key1" ); } -TODO: { - local $TODO = "Sig doesn't match, but it's legal??"; - my @array; - throws_ok { - tie @array, 'DBM::Deep', { - file => 't/test.db', - type => DBM::Deep->TYPE_ARRAY, - }; - } qr/DBM::Deep: Cannot open a hash-based file with an array/, "\$SIG_TYPE doesn't match file's type"; - - unlink "t/test.db"; - DBM::Deep->new( file => 't/test.db', type => DBM::Deep->TYPE_ARRAY ); +throws_ok { + tie my @array, 'DBM::Deep', { + file => 't/test.db', + type => DBM::Deep->TYPE_ARRAY, + }; +} qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type"; - my %hash; - throws_ok { - tie %hash, 'DBM::Deep', { - file => 't/test.db', - type => DBM::Deep->TYPE_HASH, - }; - } qr/DBM::Deep: Cannot open a array-based file with a hash/, "\$SIG_TYPE doesn't match file's type"; -} +unlink "t/test.db"; +DBM::Deep->new( file => 't/test.db', type => DBM::Deep->TYPE_ARRAY ); + +throws_ok { + tie my %hash, 'DBM::Deep', { + file => 't/test.db', + type => DBM::Deep->TYPE_HASH, + }; +} qr/DBM::Deep: File type mismatch/, "\$SIG_TYPE doesn't match file's type";