diff --git a/t/fill.t b/t/fill.t index 28d3b9cb7a..11ed91e5f7 100644 --- a/t/fill.t +++ b/t/fill.t @@ -2,7 +2,7 @@ use Test::More; use strict; use warnings; -plan tests => 4; +plan tests => 5; BEGIN { use FindBin; @@ -41,4 +41,15 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } } } +{ + my $collection = Slic3r::Polyline::Collection->new(polylines => [ + Slic3r::Polyline->new([0,15], [0,18], [0,20]), + Slic3r::Polyline->new([0,10], [0,8], [0,5]), + ]); + is_deeply + [ map $_->[Y], map @$_, $collection->shortest_path(Slic3r::Point->new(0,30)) ], + [20, 18, 15, 10, 8, 5], + 'shortest path'; +} + __END__