Algorithm-C3
view release on metacpan or search on metacpan
t/011_infinite_loop.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Algorithm::C3;
plan skip_all => "Your system has no SIGALRM" if !exists $SIG{ALRM};
plan tests => 8;
=pod
These are like the 010_complex_merge_classless test,
but an infinite loop has been made in the heirarchy,
to test that we can fail cleanly instead of going
into an infinite loop
=cut
my @loopies = (
{ #1
k => [qw(j i)],
j => [qw(f)],
i => [qw(h f)],
h => [qw(g)],
g => [qw(d)],
f => [qw(e)],
e => [qw(f)],
d => [qw(a b c)],
c => [],
b => [],
a => [],
},
{ #2
k => [qw(j i)],
j => [qw(f)],
i => [qw(h f)],
h => [qw(g)],
g => [qw(d)],
f => [qw(e)],
e => [qw(d)],
d => [qw(a b c)],
c => [qw(f)],
b => [],
a => [],
},
{ #3
k => [qw(j i)],
j => [qw(f)],
i => [qw(h f)],
h => [qw(g)],
g => [qw(d)],
f => [qw(e)],
e => [qw(d)],
d => [qw(a b c)],
c => [],
b => [],
a => [qw(k)],
},
{ #4
k => [qw(j i)],
j => [qw(f k)],
i => [qw(h f)],
h => [qw(g)],
g => [qw(d)],
f => [qw(e)],
e => [qw(d)],
d => [qw(a b c)],
c => [],
b => [],
a => [],
},
{ #5
( run in 1.002 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )