File: deep-objects.t

package info (click to toggle)
libdata-compare-perl 1.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 264 kB
  • sloc: perl: 454; sh: 3; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use strict;
use warnings;
# use diagnostics;

use Test::More;

use Data::Compare;

my $c = bless { foo => 1 }, 'Foo';
my $d = bless { c => $c }, "Foo::D";
my $e = bless { d => $d }, "Foo::E";
my $f = bless { e => $e }, "Foo::F";
my $g = bless { f => $f }, "Foo::G";
my $h = bless { g => $g }, "Foo::H";
my $i = bless { h => $h }, "Foo::I";
my $j = bless { i => $i }, "Foo::J";
my $k = Clone::clone $j;

Compare($j, $k);
ok(Compare($j, $k), 'Can compare deeply-nested objecty jibber-jabber');

done_testing();