root/branches/release-40/t/lib/Test/Deep/HashEach.pm @ 2583

Revision 2583, 318 bytes (checked in by mpaschal, 18 months ago)

Add Test::Deep to t/lib, since we already use it in driver-tests.pl
BugzID: 79953

Line 
1use strict;
2use warnings;
3
4package Test::Deep::HashEach;
5
6use Test::Deep::Cmp;
7
8sub init
9{
10        my $self = shift;
11
12        my $val = shift;
13
14        $self->{val} = $val;
15}
16
17sub descend
18{
19        my $self = shift;
20        my $got = shift;
21
22        my %exp;
23
24        @exp{keys %$got} = ($self->{val}) x (keys %$got);
25
26        return Test::Deep::descend($got, \%exp);
27}
28
291;
Note: See TracBrowser for help on using the browser.