X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-array.t;h=81635235e1e4ba02efd1070d883bb862b47482a1;hb=6b897414257c5dc3056ed7b36b8e47b54dff5d41;hp=d8497f3f9a371291f49888be5082ed4e017b75be;hpb=66428fedeb44f5f3e3d49a94c20d7ce3021dd283;p=perl%2Fmodules%2Fautovivification.git diff --git a/t/30-array.t b/t/30-array.t index d8497f3..8163523 100644 --- a/t/30-array.t +++ b/t/30-array.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 9 * 3 * 290; +use Test::More tests => 9 * 3 * 302; use lib 't/lib'; use autovivification::TestCases; @@ -116,6 +116,20 @@ $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +delete $x->[$N[0]] = 1 # 1 for $x->[$N[0]]; () # '', undef, [ 1 ] # +store $x->[$N[0]] = 1 # 1 for $x->[$N[1]]; () # '', undef, [ 1, undef ] # +store +$x # do_nothing($x->[$N[0]]); () # '', undef, [ ] +$x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +$x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +fetch +$x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +exists +$x # do_nothing($x->[$N[0]]); () # '', undef, [ ] # +delete +$x # do_nothing($x->[$N[0]]); () # qr/^Can't vivify reference/, undef, undef # +store + +$x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] +$x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +$x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +fetch +$x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +exists +$x # set_arg($x->[$N[0]]); () # '', undef, [ 1 ] # +delete +$x # set_arg($x->[$N[0]]); () # qr/^Can't vivify reference/, undef, undef # +store + --- dereferencing --- $x # no warnings 'uninitialized'; my @a = @$x; () # ($strict ? qr/^Can't use an undefined value as an ARRAY reference/ : ''), undef, undef