4 use Test::More tests => 13;
27 } qr/auto_deref without defaults don't explode on new/;
29 my ($array, @array, $hash, %hash);
38 } qr/auto_deref without default doesn't explode on get/;
40 is($obj->array, undef, "array without value is undef in scalar context");
41 is($obj->hash, undef, "hash without value is undef in scalar context");
44 local $TODO = "auto_deref not implemented";
45 is(@array, 0, "array without value is empty in list context");
46 is(keys %hash, 0, "hash without value is empty in list context");
49 @array = $obj->array([1, 2, 3]);
50 %hash = $obj->hash({foo => 1, bar => 2});
53 local $TODO = "auto_deref not implemented";
54 is_deeply(\@array, [1, 2, 3], "setter returns the dereferenced list");
55 is_deeply(\%hash, {foo => 1, bar => 2}, "setter returns the dereferenced hash");
66 } qr/auto_deref without default doesn't explode on get/;
68 is_deeply($array, [1, 2, 3], "auto_deref in scalar context gives the reference");
69 is_deeply($hash, {foo => 1, bar => 2}, "auto_deref in scalar context gives the reference");
72 local $TODO = "auto_deref not implemented";
73 is_deeply(\@array, [1, 2, 3], "auto_deref in list context gives the list");
74 is_deeply(\%hash, {foo => 1, bar => 2}, "auto_deref in list context gives the hash");