Skip to content

Commit d1281f3

Browse files
authored
Merge branch 'main' into NP-549
2 parents 9f10ae0 + d77a2a4 commit d1281f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/GCodeExportTest.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ TEST_F(GCodeExportTest, SwitchExtruderSimple)
449449
scene.extruders.emplace_back(0, nullptr);
450450
ExtruderTrain& train1 = scene.extruders.back();
451451

452+
train1.settings_.add("machine_extruder_prestart_code", ";PRESTART FIRST EXTRUDER");
453+
train1.settings_.add("machine_extruder_change_duration", "10.0");
452454
train1.settings_.add("machine_extruder_start_code", ";FIRST EXTRUDER START G-CODE!");
453455
train1.settings_.add("machine_extruder_end_code", ";FIRST EXTRUDER END G-CODE!");
454456
train1.settings_.add("machine_extruder_start_code_duration", "0.0");
@@ -459,6 +461,8 @@ TEST_F(GCodeExportTest, SwitchExtruderSimple)
459461
scene.extruders.emplace_back(1, nullptr);
460462
ExtruderTrain& train2 = scene.extruders.back();
461463

464+
train2.settings_.add("machine_extruder_prestart_code", ";PRESTART SECOND EXTRUDER");
465+
train2.settings_.add("machine_extruder_change_duration", "11.1");
462466
train2.settings_.add("machine_extruder_start_code", ";SECOND EXTRUDER START G-CODE!");
463467
train2.settings_.add("machine_extruder_end_code", ";SECOND EXTRUDER END G-CODE!");
464468
train2.settings_.add("machine_extruder_start_code_duration", "0.0");
@@ -473,7 +477,7 @@ TEST_F(GCodeExportTest, SwitchExtruderSimple)
473477
EXPECT_CALL(*mock_communication, sendCurrentPosition(testing::_));
474478
gcode.switchExtruder(1, no_retraction);
475479

476-
EXPECT_EQ(std::string("G92 E0\n;FIRST EXTRUDER END G-CODE!\nT1\nG92 E0\n;SECOND EXTRUDER START G-CODE!\n"), output.str());
480+
EXPECT_EQ(std::string("G92 E0\n;FIRST EXTRUDER END G-CODE!\n;PRESTART SECOND EXTRUDER\nT1\nG92 E0\n;SECOND EXTRUDER START G-CODE!\n"), output.str());
477481
}
478482

479483
TEST_F(GCodeExportTest, WriteZHopStartZero)

0 commit comments

Comments
 (0)