Add regression test to trap fatal errors during hilbertcurve infill generation. #880

This commit is contained in:
Alessandro Ranellucci 2012-12-31 15:05:32 +01:00
parent 1774143011
commit a633180518

View File

@ -2,7 +2,7 @@ use Test::More;
use strict; use strict;
use warnings; use warnings;
plan tests => 8; plan tests => 9;
BEGIN { BEGIN {
use FindBin; use FindBin;
@ -12,6 +12,7 @@ BEGIN {
use Slic3r; use Slic3r;
use Slic3r::Geometry qw(scale X Y); use Slic3r::Geometry qw(scale X Y);
use Slic3r::Surface qw(:types); use Slic3r::Surface qw(:types);
use Slic3r::Test;
sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
@ -87,4 +88,11 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
'shortest path'; '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__ __END__