Просмотр исходного кода

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

Alessandro Ranellucci 12 лет назад
Родитель
Сommit
a633180518
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      t/fill.t

+ 9 - 1
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__