is_deeply.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
BEGIN {
chdir 't';
}
else {
}
}
use strict;
# Can't use Test.pm, that's a 5.005 thing.
print "1..22\n";
my $test_num = 1;
# Utility testing functions.
print $ok;
}
$test_num++;
return $test;
}
print $ok;
}
$test_num++;
return $test;
}
#line 68
# Failed test ($0 at line 68)
# got: 'foo'
# expected: 'bar'
ERR
#line 78
# Failed test \\($Filename at line 78\\)
# Structures begin differing at:
# \\\$got = 'HASH\\(0x[0-9a-f]+\\)'
# \\\$expected = 'ARRAY\\(0x[0-9a-f]+\\)'
ERR
#line 88
'hashes with different values' );
# Failed test ($0 at line 88)
# Structures begin differing at:
# \$got->{this} = '42'
# \$expected->{this} = '43'
ERR
#line 99
'hashes with different keys' );
# Failed test ($0 at line 99)
# Structures begin differing at:
# \$got->{this} = Does not exist
# \$expected->{this} = '42'
ERR
#line 110
'arrays of different length' );
# Failed test ($0 at line 110)
# Structures begin differing at:
# \$got->[9] = Does not exist
# \$expected->[9] = '10'
ERR
#line 121
# Failed test ($0 at line 121)
# Structures begin differing at:
# \$got->[1] = undef
# \$expected->[1] = Does not exist
ERR
#line 131
# Failed test ($0 at line 131)
# Structures begin differing at:
# \$got->{foo} = undef
# \$expected->{foo} = Does not exist
ERR
#line 141
# Failed test ($0 at line 141)
# Structures begin differing at:
# \${ \$got} = '42'
# \${\$expected} = '23'
ERR
#line 151
'mixed scalar and array refs' );
# Failed test \\($Filename at line 151\\)
# Structures begin differing at:
# \\\$got = 'ARRAY\\(0x[0-9a-f]+\\)'
# \\\$expected = 'SCALAR\\(0x[0-9a-f]+\\)'
ERR
$a3 = 42;
$b3 = 23;
#line 173
# Failed test ($0 at line 173)
# Structures begin differing at:
# \${\${ \$got}} = '42'
# \${\${\$expected}} = '23'
ERR
# I don't know how to properly display this structure.
# $a2 = { foo => \$a3 };
# $b2 = { foo => \$b3 };
# is_deeply([$a1], [$b1], 'deep mixed scalar refs');
my $foo = {
this => [1..10],
};
my $bar = {
this => [1..10],
};
#line 198
# Failed test ($0 at line 198)
# Structures begin differing at:
# \$got->{that}{foo} = Does not exist
# \$expected->{that}{foo} = '42'
ERR