Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add a script that cross-checks MRO of type-graph.txt with Rakudo
  • Loading branch information
moritz committed Jul 25, 2012
1 parent bf9c66f commit 06d1593
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions util/check-type-graph.pl6
@@ -0,0 +1,20 @@
#!/usr/bin/env perl6
use v6;
use lib 'lib';
use Perl6::TypeGraph;

my $t = Perl6::TypeGraph.new-from-file('type-graph.txt');

for $t.sorted -> $type {
next if $type.name.index('Metamodel').defined || $type.name eq 'PROCESS';
next unless ::($type).^name eq $type.name;
next if $type.packagetype eq 'role';
my $got = ~$type.mro;
my $expected = ~::($type).^mro.map: *.^name;
say "$got vs $expected" if $got ne $expected;
CATCH {
default {
say "Trouble with $type: $_";
}
}
}

0 comments on commit 06d1593

Please sign in to comment.