mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 05:59:53 +02:00
Make tests happy
This commit is contained in:
1 parent
5571144c0e
commit
b14290b9f6
10 files changed
+19
-14
No files matched your search
+7
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user