root/branches/release-40/t/lib/Test/Deep/ArrayEach.pm
@
2583
| Revision 2583, 295 bytes (checked in by mpaschal, 18 months ago) |
|---|
| Line | |
|---|---|
| 1 | use strict; |
| 2 | use warnings; |
| 3 | |
| 4 | package Test::Deep::ArrayEach; |
| 5 | |
| 6 | use Test::Deep::Cmp; |
| 7 | |
| 8 | sub init |
| 9 | { |
| 10 | my $self = shift; |
| 11 | |
| 12 | my $val = shift; |
| 13 | |
| 14 | $self->{val} = $val; |
| 15 | } |
| 16 | |
| 17 | sub descend |
| 18 | { |
| 19 | my $self = shift; |
| 20 | my $got = shift; |
| 21 | |
| 22 | my $exp = [ ($self->{val}) x @$got ]; |
| 23 | |
| 24 | return Test::Deep::descend($got, $exp); |
| 25 | } |
| 26 | |
| 27 | 1; |
Note: See TracBrowser
for help on using the browser.
