mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 03:11:59 +08:00
Fall back to not using make::unique for now
This commit is contained in:
parent
d514d7adb6
commit
ee0bac47bc
@ -9,7 +9,7 @@ using namespace std::literals::string_literals;
|
||||
|
||||
SCENARIO("lift() is not ignored after unlift() at large values of Z", "[!mayfail]") {
|
||||
GIVEN("A config from a file and a single extruder.")
|
||||
auto writer {std::make_unique(GCodeWriter())}; // ensure cleanup later
|
||||
auto* writer {new GCodeWriter()};
|
||||
auto& config {writer->config};
|
||||
config.set_defaults();
|
||||
config.load(std::string(testfile_dir) + "test_gcodewriter/config_lift_unlift.ini"s);
|
||||
@ -18,13 +18,13 @@ SCENARIO("lift() is not ignored after unlift() at large values of Z", "[!mayfail
|
||||
writer->set_extruders(extruder_ids);
|
||||
writer->set_extruder(0);
|
||||
|
||||
double trouble_Z = 9007199254740992;
|
||||
WHEN("Z is set to 9007199254740992") {
|
||||
double trouble_Z = 9007199254740992;
|
||||
writer->travel_to_z(trouble_Z);
|
||||
AND_WHEN("GcodeWriter::Lift() is called") {
|
||||
REQUIRE(writer->lift().size() > 0);
|
||||
AND_WHEN("Z is moved post-lift to the same delta as the config Z lift") {
|
||||
writer->travel_to_z(trouble_z + config.retract_lift);
|
||||
REQUIRE(writer->travel_to_z(trouble_z + config.retract_lift).size() == 0);
|
||||
AND_WHEN("GCodeWriter::Lift() is called after GCodeWriter::Unlift()") {
|
||||
REQUIRE(writer->unlift().size() > 0);
|
||||
THEN("GCodeWriter::Lift() emits gcode.") {
|
||||
@ -34,4 +34,5 @@ SCENARIO("lift() is not ignored after unlift() at large values of Z", "[!mayfail
|
||||
}
|
||||
}
|
||||
}
|
||||
delete writer;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user