From: Nicholas Clark Date: Thu, 20 Aug 2009 20:12:44 +0000 (+0100) Subject: Instead of trusting mro::get_linear_isa(), test it against the expected output. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=04e5ac63d9ec63668adef6a2f488bbfb22cce7a8;p=p5sagit%2Fp5-mst-13.2.git Instead of trusting mro::get_linear_isa(), test it against the expected output. --- diff --git a/t/mro/isa_dfs.t b/t/mro/isa_dfs.t index 6eabf1f..889ee6e 100644 --- a/t/mro/isa_dfs.t +++ b/t/mro/isa_dfs.t @@ -43,9 +43,21 @@ package main; require mro; +my %expect = + ( + klonk => [qw(klonk)], + urkkk => [qw(urkkk klonk kapow)], + kapow => [qw(kapow)], + kayo => [qw(kayo)], + thwacke => [qw(thwacke)], + zzzzzwap => [qw(zzzzzwap thwacke kapow)], + whamm => [qw(whamm kapow thwacke)], + ); + foreach my $package (qw(klonk urkkk kapow kayo thwacke zzzzzwap whamm)) { my $ref = bless [], $package; - my $isa = mro::get_linear_isa($package); + my $isa = $expect{$package}; + is("@{mro::get_linear_isa($package)}", "@$isa", "\@ISA for $package"); foreach my $class ($package, @$isa, 'UNIVERSAL') { isa_ok($ref, $class, $package);