Slight improvements of unit tests, fix of perl bindings.

This commit is contained in:
bubnikv 2019-10-18 12:05:37 +02:00
parent 13cc74ef0a
commit e04e2b3636
4 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ SCENARIO("Extrusion width specifics", "[!mayfail]") {
WHEN("first layer width set to 2mm") {
Slic3r::Model model;
config.set_deserialize("first_layer_extrusion_width", "2");
config.set("first_layer_extrusion_width", 2);
Slic3r::Print print;
Slic3r::Test::init_print({TestMesh::cube_20x20x20}, print, model, config);

View File

@ -74,7 +74,7 @@ SCENARIO("Print: Changing number of solid surfaces does not cause all surfaces t
test_is_solid_infill(0, 39); // should be solid
test_is_solid_infill(0, 38); // should be solid
WHEN("Model is re-sliced with top_solid_layers == 3") {
config.opt_int("top_solid_layers") = 3;
config.set("top_solid_layers", 3);
print.apply(model, config);
print.process();
THEN("Print object does not have 0 solid bottom layers.") {

View File

@ -244,7 +244,7 @@ SCENARIO("Original Slic3r Skirt/Brim tests", "[!mayfail]") {
}
}
WHEN("Large minimum skirt length is used.") {
config.opt_float("min_skirt_length") = 20;
config.set("min_skirt_length", 20);
THEN("Gcode generation doesn't crash") {
REQUIRE(! Slic3r::Test::slice({TestMesh::cube_20x20x20}, config).empty());
}

View File

@ -299,7 +299,7 @@ bool ConfigBase__set_deserialize(ConfigBase* THIS, const t_config_option_key &op
size_t len;
const char * c = SvPV(str, len);
std::string value(c, len);
return THIS->set_deserialize(opt_key, value);
return THIS->set_deserialize_nothrow(opt_key, value);
}
void ConfigBase__set_ifndef(ConfigBase* THIS, const t_config_option_key &opt_key, SV* value, bool deserialize)