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

Revision 2583, 472 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::Ref;
5
6use Test::Deep::Cmp;
7
8use Scalar::Util qw( blessed );
9
10sub test_class
11{
12        my $self = shift;
13        my $got = shift;
14
15        my $exp = $self->{val};
16       
17        if ($Test::Deep::Snobby)
18        {
19                return Test::Deep::descend($got, Test::Deep::blessed(blessed($exp)));
20        }
21        else
22        {
23                return 1;
24        }
25}
26
27sub test_reftype
28{
29        my $self = shift;
30        my $got = shift;
31        my $reftype = shift;
32
33        return Test::Deep::descend($got, Test::Deep::reftype($reftype));
34}
35
361;
Note: See TracBrowser for help on using the browser.