6 use Test::More tests => 1;
9 use_ok('Algorithm::C3');
14 This is like the 010_complex_merge_classless test,
15 but an infinite loop has been made in the heirarchy,
16 to test that we can fail cleanly instead of going
36 return @{ $foo->{ $_[0] } };
40 local $SIG{ALRM} = sub { die "ALRMTimeout" };
42 Algorithm::C3::merge('k', \&supers);
46 if($err =~ /ALRMTimeout/) {
47 ok(0, "Loop terminated by SIGALRM");
49 elsif($err =~ /Infinite loop detected/) {
50 ok(1, "Graceful exception thrown");
53 ok(0, "Unrecognized exception: $err");
57 ok(0, "Infinite loop apparently succeeded???");