Initial Commit
This commit is contained in:
29
database/perl/lib/Test/Deep/HashEach.pm
Normal file
29
database/perl/lib/Test/Deep/HashEach.pm
Normal file
@@ -0,0 +1,29 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package Test::Deep::HashEach;
|
||||
|
||||
use Test::Deep::Cmp;
|
||||
|
||||
sub init
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
my $val = shift;
|
||||
|
||||
$self->{val} = $val;
|
||||
}
|
||||
|
||||
sub descend
|
||||
{
|
||||
my $self = shift;
|
||||
my $got = shift;
|
||||
|
||||
my %exp;
|
||||
|
||||
@exp{keys %$got} = ($self->{val}) x (keys %$got);
|
||||
|
||||
return Test::Deep::descend($got, \%exp);
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user