From: Vincent Pit Date: Wed, 17 Jun 2009 14:22:48 +0000 (+0200) Subject: Test "use autovivification" X-Git-Tag: v0.02~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=73280498f45aec1d15e1e9d67eb441e10c9a49a5;p=perl%2Fmodules%2Fautovivification.git Test "use autovivification" --- diff --git a/t/20-hash.t b/t/20-hash.t index d4cf269..aac9f97 100644 --- a/t/20-hash.t +++ b/t/20-hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 6 * 3 * 270; +use Test::More tests => 6 * 3 * 274; use lib 't/lib'; use autovivification::TestCases; @@ -25,6 +25,11 @@ $x # $x->{a} # '', undef, { } # +exists $x # $x->{a} # '', undef, { } # +delete $x # $x->{a} # '', undef, { } # +store +$x # $x->{a} # '', undef, { } # -fetch +$x # $x->{a} # '', undef, { } # +fetch -fetch +$x # $x->{a} # '', undef, undef # -fetch +fetch +$x # $x->{a} # '', undef, undef # +fetch -exists + $x # $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch $x # $x->{a} # '', undef, { } # +strict +exists $x # $x->{a} # '', undef, { } # +strict +delete diff --git a/t/21-array.t b/t/21-array.t index bf843d6..eeb8811 100644 --- a/t/21-array.t +++ b/t/21-array.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 6 * 3 * 270; +use Test::More tests => 6 * 3 * 274; use lib 't/lib'; use autovivification::TestCases; @@ -25,6 +25,11 @@ $x # $x->[0] # '', undef, [ ] # +exists $x # $x->[0] # '', undef, [ ] # +delete $x # $x->[0] # '', undef, [ ] # +store +$x # $x->[0] # '', undef, [ ] # -fetch +$x # $x->[0] # '', undef, [ ] # +fetch -fetch +$x # $x->[0] # '', undef, undef # -fetch +fetch +$x # $x->[0] # '', undef, undef # +fetch -exists + $x # $x->[0] # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch $x # $x->[0] # '', undef, [ ] # +strict +exists $x # $x->[0] # '', undef, [ ] # +strict +delete