From 07282eb24d027817b4279f59ebbf0d80bac5f950 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 22 May 2019 16:43:14 +0200 Subject: 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. --- t/combineinfill.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/combineinfill.t') 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 } -- cgit v1.2.3