Skip to content

Commit

Permalink
Fix xt/type-graph.t test, close Raku#3001
Browse files Browse the repository at this point in the history
* Telemetry module is needed to use telemetry related types
* Types whitout 'mro' method support has been whitelisted
* UInt was missing
* X::Scheduler::CueInNaNSeconds mro fixed
  • Loading branch information
antoniogamiz committed Sep 12, 2019
1 parent 52945a5 commit 2abff48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion type-graph.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class Int is Cool does Real
class Num is Cool does Real
class Complex is Cool does Numeric
class int is Int
class UInt
class atomicint is Int

[Basic]
Expand Down Expand Up @@ -355,7 +356,7 @@ role X::Temporal is Exception
class X::Temporal::InvalidFormat does X::Temporal
class X::DateTime::InvalidDeltaUnit does X::Temporal
class X::DateTime::TimezoneClash does X::Temporal
class X::Scheduler::CueInNaNSeconds
class X::Scheduler::CueInNaNSeconds is Exception

[Exceptions]
# Exceptions: Composition
Expand Down
4 changes: 3 additions & 1 deletion xt/type-graph.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ use v6;

use Test;
use Perl6::TypeGraph;
use Telemetry;

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 if $type.packagetype eq 'role'|'module';
next if $type.name eq 'Failure';
# these types does not support mro => whitelisted
next if $type.name eq any(<Failure MOP Routine::WrapHandle Encoding UInt>);
try {
my $got = ~$type.mro;
my $expected = ~::($type).^mro.map: *.^name;
Expand Down

0 comments on commit 2abff48

Please sign in to comment.