Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2019-05-22 17:43:14 +0300
committerLukas Matena <lukasmatena@seznam.cz>2019-05-22 17:48:20 +0300
commit07282eb24d027817b4279f59ebbf0d80bac5f950 (patch)
tree1096f7eb0a97912139115b9d9c8acbcfdb121bb7 /t
parent82740835fbe64af4bba11f0122706f0009a670be (diff)
Fixed unit tests when run with range checks on std::vector
There was a bug in unit tests that led to generating the wipe tower with non-normalized preset. This caused out-of-bounds access into max_layer_height vector in fill_wipe_tower_partitions. The problem surfaced in https://github.com/prusa3d/PrusaSlicer/issues/2288. I quickly patched additional normalization of the preset to prevent this from happening. Also, an assert in the same function turned out to trip on one of the tests. This one was commented out for now and will (hopefully) be looked into later. Function Print::apply_config was renamed to apply_config_perl_tests_only so everyone sees its current purpose and does not mistake it for the more important Print::apply.
Diffstat (limited to 't')
-rw-r--r--t/combineinfill.t2
-rw-r--r--t/print.t2
-rw-r--r--t/skirt_brim.t2
3 files changed, 3 insertions, 3 deletions
diff --git a/t/combineinfill.t b/t/combineinfill.t
index 563ecb9c1..8aa0ff5e3 100644
--- a/t/combineinfill.t
+++ b/t/combineinfill.t
@@ -89,7 +89,7 @@ plan tests => 8;
# we disable combination after infill has been generated
$config->set('infill_every_layers', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
$print->process;
ok !(defined first { @{$_->get_region(0)->fill_surfaces} == 0 }
diff --git a/t/print.t b/t/print.t
index 6939d5f15..be2db3431 100644
--- a/t/print.t
+++ b/t/print.t
@@ -44,7 +44,7 @@ use Slic3r::Test;
is $print->print->regions->[0]->config->fill_density, 100, 'region config inherits model object config';
# user exports G-code, thus the default config is reapplied
- $print->print->apply_config($config);
+ $print->print->apply_config_perl_tests_only($config);
is $print->print->regions->[0]->config->fill_density, 100, 'apply_config() does not override per-object settings';
diff --git a/t/skirt_brim.t b/t/skirt_brim.t
index 225b0a92f..b05435784 100644
--- a/t/skirt_brim.t
+++ b/t/skirt_brim.t
@@ -106,7 +106,7 @@ use Slic3r::Test;
# we enable support material after skirt has been generated
$config->set('support_material', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
my $skirt_length = 0;
my @extrusion_points = ();