mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 19:41:58 +08:00
Adjust test for current_extruder being second extruder
This commit is contained in:
parent
8216f22d70
commit
b22b1ae300
@ -224,6 +224,7 @@ SCENARIO( "PrintGCode basic functionality") {
|
|||||||
}
|
}
|
||||||
WHEN("current_extruder exists in start_gcode") {
|
WHEN("current_extruder exists in start_gcode") {
|
||||||
config->set("start_gcode", "; Extruder [current_extruder]");
|
config->set("start_gcode", "; Extruder [current_extruder]");
|
||||||
|
{
|
||||||
Slic3r::Model model;
|
Slic3r::Model model;
|
||||||
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
||||||
Slic3r::Test::gcode(gcode, print);
|
Slic3r::Test::gcode(gcode, print);
|
||||||
@ -231,12 +232,21 @@ SCENARIO( "PrintGCode basic functionality") {
|
|||||||
THEN("current_extruder is processed in the start gcode and set for first extruder") {
|
THEN("current_extruder is processed in the start gcode and set for first extruder") {
|
||||||
REQUIRE(exported.find("; Extruder 0") != std::string::npos);
|
REQUIRE(exported.find("; Extruder 0") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
config->set("solid_infill_extruder", 2);
|
||||||
|
config->set("support_material_extruder", 2);
|
||||||
|
config->set("infill_extruder", 2);
|
||||||
|
config->set("perimeter_extruder", 2);
|
||||||
|
{
|
||||||
|
Slic3r::Model model;
|
||||||
|
auto print {Slic3r::Test::init_print({TestMesh::cube_20x20x20}, model, config)};
|
||||||
Slic3r::Test::gcode(gcode, print);
|
Slic3r::Test::gcode(gcode, print);
|
||||||
auto exported {gcode.str()};
|
auto exported {gcode.str()};
|
||||||
THEN("current_extruder is processed in the start gcode and set for second extruder") {
|
THEN("current_extruder is processed in the start gcode and set for second extruder") {
|
||||||
REQUIRE(exported.find("; Extruder 1") != std::string::npos);
|
REQUIRE(exported.find("; Extruder 1") != std::string::npos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gcode.clear();
|
gcode.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user