#include #include "test_helpers.hpp" #include using namespace Slic3r; using namespace Slic3r::Test; // The fan is held off for the first close_fan_the_first_x_layers layers, so an explicit // fan-off command is emitted. TEST_CASE("Fan is held off for the initial layers", "[Cooling]") { const std::string gcode = slice({ cube(20) }, { { "cooling", true }, { "close_fan_the_first_x_layers", 5 }, }); CHECK(gcode.find("M106 S0") != std::string::npos); } // The cooling pass resolves and strips its internal speed placeholders; none leak into // the final G-code. TEST_CASE("Cooling consumes its internal speed markers", "[Cooling]") { const std::string gcode = slice({ cube(20) }, { { "layer_height", 0.2 } }); CHECK(gcode.find(";_EXTRUDE_SET_SPEED") == std::string::npos); }