Tickit

 view release on metacpan or  search on metacpan

t/02rectset.t  view on Meta::CPAN


   die "Unrecognised rectangle spec $_\n";
}

my $name;
while( <DATA> ) {
   next if m/^\s*$/;
   $name = $1, next if m/^\s*#\s*(.*)$/;

   my ( $input, $output ) = m/^(.*)\s*=>\s*(.*)$/ or die "Expected =>\n";
   my @input = split m/\s+/, $input;
   my $method = shift @input;
   my @inputrects  = map _newrect($_), @input;
   my @outputrects = map string(_newrect($_)), split m/\s+/, $output;

   if( $method eq "add" ) {
      my $rectset = Tickit::RectSet->new;
      $rectset->add( $_ ) for @inputrects;

      is( [ $rectset->rects ], \@outputrects, "Output for $name $input" );

      $rectset = Tickit::RectSet->new;
      $rectset->add( $_ ) for reverse @inputrects;



( run in 1.059 second using v1.01-cache-2.11-cpan-71847e10f99 )