mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 14:04:11 -06:00
Make tests happy
This commit is contained in:
parent
5571144c0e
commit
b14290b9f6
10 changed files with 19 additions and 14 deletions
|
@ -329,13 +329,16 @@ use Slic3r::Test;
|
|||
scalar(@$expolygons), 'expected number of collections';
|
||||
ok !defined(first { !$_->isa('Slic3r::ExtrusionPath::Collection') } @{$g->loops}),
|
||||
'everything is returned as collections';
|
||||
is scalar(map @$_, @{$g->loops}),
|
||||
|
||||
my $flattened_loops = $g->loops->flatten;
|
||||
my @loops = @$flattened_loops;
|
||||
is scalar(@loops),
|
||||
$expected{total}, 'expected number of loops';
|
||||
is scalar(grep $_->role == EXTR_ROLE_EXTERNAL_PERIMETER, map @$_, map @$_, @{$g->loops}),
|
||||
is scalar(grep $_->role == EXTR_ROLE_EXTERNAL_PERIMETER, map @$_, @loops),
|
||||
$expected{external}, 'expected number of external loops';
|
||||
is scalar(grep $_->role == EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER, map @$_, @{$g->loops}),
|
||||
is scalar(grep $_->role == EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER, @loops),
|
||||
$expected{cinternal}, 'expected number of internal contour loops';
|
||||
is scalar(grep $_->polygon->is_counter_clockwise, map @$_, @{$g->loops}),
|
||||
is scalar(grep $_->polygon->is_counter_clockwise, @loops),
|
||||
$expected{ccw}, 'expected number of ccw loops';
|
||||
|
||||
return $g;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue