From a633180518ebfe2ec1805aa9d63cc9c9f4c00ccb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 31 Dec 2012 15:05:32 +0100 Subject: [PATCH] Add regression test to trap fatal errors during hilbertcurve infill generation. #880 --- t/fill.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/fill.t b/t/fill.t index eb7c8fdb8..5576374a8 100644 --- a/t/fill.t +++ b/t/fill.t @@ -2,7 +2,7 @@ use Test::More; use strict; use warnings; -plan tests => 8; +plan tests => 9; BEGIN { use FindBin; @@ -12,6 +12,7 @@ BEGIN { use Slic3r; use Slic3r::Geometry qw(scale X Y); use Slic3r::Surface qw(:types); +use Slic3r::Test; sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } @@ -87,4 +88,11 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } 'shortest path'; } +{ + my $config = Slic3r::Config->new_from_defaults; + $config->set('fill_pattern', 'hilbertcurve'); + my $print = Slic3r::Test::init_print('20mm_cube', config => $config); + ok Slic3r::Test::gcode($print), 'successful hilbertcurve infill generation'; +} + __END__