From: Karen Etheridge Date: Thu, 20 Jun 2013 19:06:30 +0000 (-0700) Subject: Test::Deep is already required; use it instead of is_deeply X-Git-Tag: 0.34~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=619ab942be0a8bd8f530c57ca5b0c8d833cdc89b;p=gitmo%2FMooseX-Storage.git Test::Deep is already required; use it instead of is_deeply --- diff --git a/t/001_basic.t b/t/001_basic.t index faf41eb..1f96199 100644 --- a/t/001_basic.t +++ b/t/001_basic.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 14; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -42,7 +43,7 @@ BEGIN { ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -87,8 +88,8 @@ BEGIN { is( $foo->string, 'foo', '... got the right string' ); ok( $foo->boolean, '... got the right boolean' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -97,6 +98,6 @@ BEGIN { isa_ok( $foo->object, 'Foo' ); is( $foo->object->number, 2, '... got the right number (in the embedded object)' ); - is_deeply( $foo->union, [ 1 .. 3 ], '... got the right array (in the union)' ); + cmp_deeply( $foo->union, [ 1 .. 3 ], '... got the right array (in the union)' ); is( $foo->union2, 'A String', '... got the right string (in the union)' ); } diff --git a/t/002_basic_io.t b/t/002_basic_io.t index 0293692..7aacd30 100644 --- a/t/002_basic_io.t +++ b/t/002_basic_io.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; @@ -60,8 +61,8 @@ my $file = catfile($dir, 'temp.json'); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff --git a/t/002_basic_w_subtypes.t b/t/002_basic_w_subtypes.t index 16bad20..61e341b 100644 --- a/t/002_basic_w_subtypes.t +++ b/t/002_basic_w_subtypes.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 11; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -67,7 +68,7 @@ cases. ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -105,8 +106,8 @@ cases. is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/003_basic_w_embedded_objects.t b/t/003_basic_w_embedded_objects.t index 55c4e6c..ccc7e14 100644 --- a/t/003_basic_w_embedded_objects.t +++ b/t/003_basic_w_embedded_objects.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 47; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -55,7 +56,7 @@ ArrayRef and HashRef type handlers. ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -101,7 +102,7 @@ ArrayRef and HashRef type handlers. ); isa_ok( $baz, 'Baz' ); - is_deeply( + cmp_deeply( $baz->pack, { __CLASS__ => 'Baz', diff --git a/t/004_w_cycles.t b/t/004_w_cycles.t index 6dd816e..7987bba 100644 --- a/t/004_w_cycles.t +++ b/t/004_w_cycles.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 18; +use Test::Deep; use Test::Fatal; BEGIN { @@ -86,7 +87,7 @@ This test demonstrates two things: my $t = Tree->new(node => 100); isa_ok($t, 'Tree'); - is_deeply( + cmp_deeply( $t->pack, { __CLASS__ => 'Tree', @@ -100,12 +101,12 @@ This test demonstrates two things: $t->add_child($t2); - is_deeply($t->children, [ $t2 ], '... got the right children in $t'); + cmp_deeply($t->children, [ $t2 ], '... got the right children in $t'); is($t2->parent, $t, '... created the cycle correctly'); isa_ok($t2->parent, 'Tree'); - is_deeply( + cmp_deeply( $t->pack, { __CLASS__ => 'Tree', @@ -120,7 +121,7 @@ This test demonstrates two things: }, '... got the right packed version (with parent attribute skipped in child)'); - is_deeply( + cmp_deeply( $t2->pack, { __CLASS__ => 'Tree', diff --git a/t/005_w_versions_and_authority_check.t b/t/005_w_versions_and_authority_check.t index 7f4456f..cafb13a 100644 --- a/t/005_w_versions_and_authority_check.t +++ b/t/005_w_versions_and_authority_check.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 8; +use Test::Deep; use Test::Fatal; BEGIN { @@ -50,7 +51,7 @@ checks are performed upon object expansion. ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo-0.01-cpan:JRANDOM', diff --git a/t/006_w_custom_type_handlers.t b/t/006_w_custom_type_handlers.t index 2583f80..2a352ad 100644 --- a/t/006_w_custom_type_handlers.t +++ b/t/006_w_custom_type_handlers.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 9; +use Test::Deep; use Test::Fatal; BEGIN { @@ -67,7 +68,7 @@ isa_ok($foo, 'Foo'); isa_ok($foo->bar, 'Bar'); -is_deeply( +cmp_deeply( $foo->pack, { __CLASS__ => "Foo", diff --git a/t/007_false.t b/t/007_false.t index 1b19ea6..8a91fd7 100644 --- a/t/007_false.t +++ b/t/007_false.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 8; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -32,7 +33,7 @@ BEGIN { is($foo->boolean, 0, '... got the right boolean value'); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', diff --git a/t/008_do_not_serialize.t b/t/008_do_not_serialize.t index 200e90b..27afeb1 100644 --- a/t/008_do_not_serialize.t +++ b/t/008_do_not_serialize.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 13; +use Test::Deep; use Test::Fatal; BEGIN { @@ -44,7 +45,7 @@ BEGIN { is($foo->baz, 'BAZ', '... got the value we expected'); is($foo->gorch, 'GORCH', '... got the value we expected'); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -82,7 +83,7 @@ BEGIN { is( $bar->zot, $$, " ->zot => $$" ); my $bpack = $bar->pack; - is_deeply( + cmp_deeply( $bpack, { __CLASS__ => 'Bar', zot => $$, diff --git a/t/009_do_not_serialize_lazy.t b/t/009_do_not_serialize_lazy.t index 0e7fc7a..3a6c9cc 100644 --- a/t/009_do_not_serialize_lazy.t +++ b/t/009_do_not_serialize_lazy.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More 'no_plan';#tests => 6; +use Test::Deep; use Test::Fatal; BEGIN { @@ -37,7 +38,7 @@ is( $href->{'x'}, $$, " x => $$" ); is( $href->{'z'}, 'z', " z => z" ); ok( not(exists($href->{'y'})), " y does not exist" ); -is_deeply( +cmp_deeply( $href, { '__CLASS__' => 'Point', 'x' => $$, diff --git a/t/010_basic_json.t b/t/010_basic_json.t index 7f405e8..22b4261 100644 --- a/t/010_basic_json.t +++ b/t/010_basic_json.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Test::Requires { 'Test::JSON' => 0.01, # skip all if not installed @@ -65,8 +66,8 @@ BEGIN { is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/012_param_json.t b/t/012_param_json.t index 1a3bb20..dfa103d 100644 --- a/t/012_param_json.t +++ b/t/012_param_json.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Test::Requires { 'MooseX::Storage::Format::JSONpm' => 0.01, # skip all if not installed @@ -64,7 +65,7 @@ for my $jsonpm ( my $json = eval { Bar->new(x => 10, y => 20)->freeze({ format => $p }) }; - is_deeply( + cmp_deeply( JSON->new->decode($json), { '__CLASS__' => 'Bar-0.01', diff --git a/t/020_basic_yaml.t b/t/020_basic_yaml.t index 1cb5137..a795783 100644 --- a/t/020_basic_yaml.t +++ b/t/020_basic_yaml.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Test::Requires { 'YAML::Any' => 0.01, # skip all if not installed @@ -53,8 +54,8 @@ BEGIN { is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/020_basic_yaml_syck.t b/t/020_basic_yaml_syck.t index 19d086c..42a2368 100644 --- a/t/020_basic_yaml_syck.t +++ b/t/020_basic_yaml_syck.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Test::Requires { 'YAML::Any' => 0.01, # skip all if not installed @@ -52,8 +53,8 @@ BEGIN { is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/020_basic_yaml_xs.t b/t/020_basic_yaml_xs.t index 8f19177..27592e8 100644 --- a/t/020_basic_yaml_xs.t +++ b/t/020_basic_yaml_xs.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Test::Requires { 'YAML::Any' => 0.01, # skip all if not installed @@ -52,8 +53,8 @@ BEGIN { is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/050_basic_storable.t b/t/050_basic_storable.t index 7c98748..bdf1e7d 100644 --- a/t/050_basic_storable.t +++ b/t/050_basic_storable.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 11; +use Test::Deep; use Storable; BEGIN { @@ -40,7 +41,7 @@ BEGIN { my $stored = $foo->freeze; my $struct = Storable::thaw($stored); - is_deeply( + cmp_deeply( $struct, { '__CLASS__' => 'Foo', @@ -78,8 +79,8 @@ BEGIN { is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/060_basic_deferred.t b/t/060_basic_deferred.t index 59d3c83..e99973a 100644 --- a/t/060_basic_deferred.t +++ b/t/060_basic_deferred.t @@ -5,6 +5,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use Storable; use Test::Requires { @@ -67,8 +68,8 @@ diag('Using implementation: ', YAML::Any->implementation); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -93,7 +94,7 @@ diag('Using implementation: ', YAML::Any->implementation); my $stored = $foo->freeze({ 'format' => 'Storable' }); my $struct = Storable::thaw($stored); - is_deeply( + cmp_deeply( $struct, { '__CLASS__' => 'Foo', @@ -131,8 +132,8 @@ diag('Using implementation: ', YAML::Any->implementation); is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -162,8 +163,8 @@ diag('Using implementation: ', YAML::Any->implementation); is( $bar->number, 10, '... got the right number' ); is( $bar->string, 'foo', '... got the right string' ); is( $bar->float, 10.5, '... got the right float' ); - is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $bar->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/061_basic_deferred_w_io.t b/t/061_basic_deferred_w_io.t index f66508c..b0a24ac 100644 --- a/t/061_basic_deferred_w_io.t +++ b/t/061_basic_deferred_w_io.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; @@ -57,8 +58,8 @@ my $file = catfile($dir, 'temp.json'); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); @@ -88,8 +89,8 @@ ok(!(-e $file), '... the file has been deleted'); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff --git a/t/070_basic_maybe.t b/t/070_basic_maybe.t index c154327..75e34d2 100644 --- a/t/070_basic_maybe.t +++ b/t/070_basic_maybe.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 22; +use Test::Deep; BEGIN { use_ok('MooseX::Storage'); @@ -38,7 +39,7 @@ BEGIN { ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -79,8 +80,8 @@ BEGIN { is( $foo->string, 'foo', '... got the right string' ); ok( $foo->boolean, '... got the right boolean' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' @@ -142,7 +143,7 @@ BEGIN { ); isa_ok( $foo, 'Foo' ); - is_deeply( + cmp_deeply( $foo->pack, { __CLASS__ => 'Foo', @@ -180,8 +181,8 @@ BEGIN { is( $foo->number, 10, '... got the right number' ); is( $foo->string, 'foo', '... got the right string' ); is( $foo->float, 10.5, '... got the right float' ); - is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); - is_deeply( + cmp_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' ); + cmp_deeply( $foo->hash, { map { $_ => undef } ( 1 .. 10 ) }, '... got the right hash' diff --git a/t/100_io.t b/t/100_io.t index 610eaa9..1fc86a5 100644 --- a/t/100_io.t +++ b/t/100_io.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; @@ -55,8 +56,8 @@ my $file = catfile( $dir, 'temp.json' ); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff --git a/t/101_io_atomic.t b/t/101_io_atomic.t index 3e629d9..67d6714 100644 --- a/t/101_io_atomic.t +++ b/t/101_io_atomic.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); @@ -56,8 +57,8 @@ my $file = catfile($dir,'temp.json'); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff --git a/t/102_io_storable_file.t b/t/102_io_storable_file.t index 2ff5625..c44e43a 100644 --- a/t/102_io_storable_file.t +++ b/t/102_io_storable_file.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 10; +use Test::Deep; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); @@ -50,8 +51,8 @@ my $file = catfile($dir,'temp.storable'); is($foo->number, 10, '... got the right number'); is($foo->string, 'foo', '... got the right string'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)'); diff --git a/t/103_io_storable_file_custom.t b/t/103_io_storable_file_custom.t index 87878c3..71664bb 100644 --- a/t/103_io_storable_file_custom.t +++ b/t/103_io_storable_file_custom.t @@ -4,6 +4,7 @@ use strict; use warnings; use Test::More tests => 11; +use Test::Deep; use Storable (); use File::Temp qw(tempdir); use File::Spec::Functions; @@ -62,7 +63,7 @@ my $file = catfile($dir,'temp.storable'); # check our custom freeze hook fired ... my $data = Storable::retrieve($file); - is_deeply( + cmp_deeply( $data, { '__CLASS__' => 'Foo', @@ -90,8 +91,8 @@ my $file = catfile($dir,'temp.storable'); is($foo->number, 10, '... got the right number'); is($foo->float, 10.5, '... got the right float'); - is_deeply($foo->array, [ 1 .. 10], '... got the right array'); - is_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); + cmp_deeply($foo->array, [ 1 .. 10], '... got the right array'); + cmp_deeply($foo->hash, { map { $_ => undef } (1 .. 10) }, '... got the right hash'); isa_ok($foo->object, 'Foo'); is($foo->object->number, 2, '... got the right number (in the embedded object)');