diff --git a/src/test/libslic3r/test_fill.cpp b/src/test/libslic3r/test_fill.cpp index 86aca387b..002ab2a7c 100644 --- a/src/test/libslic3r/test_fill.cpp +++ b/src/test/libslic3r/test_fill.cpp @@ -289,8 +289,8 @@ TEST_CASE("Fill: extrude gcode and check it") } }); - double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2)); - double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * ((PI / 2)); + double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2)); + double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * ((PI / 2)); //for (Line &l : print.objects()[0]->layers()[0]->slices.expolygons[0].contour.lines()) { //} @@ -397,8 +397,8 @@ TEST_CASE("Fill: extrude gcode and check it") } }); - double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2)); - double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * ((PI / 2)); + double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2)); + double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * ((PI / 2)); double volumeExtrPerimeter = ExtrusionGetVolume{}.get(print.objects()[0]->layers()[0]->regions()[0]->perimeters); double volumeExtrInfill = ExtrusionGetVolume{}.get(print.objects()[0]->layers()[0]->regions()[0]->fills); diff --git a/src/test/libslic3r/test_gcodewriter.cpp b/src/test/libslic3r/test_gcodewriter.cpp index c3cd56982..769bb2ab1 100644 --- a/src/test/libslic3r/test_gcodewriter.cpp +++ b/src/test/libslic3r/test_gcodewriter.cpp @@ -116,9 +116,15 @@ SCENARIO("set_speed emits values with fixed-point output.") { GIVEN("GCodeWriter instance") { GCodeWriter writer; - WHEN("set_speed is called to set speed to 1.09321e+06") { - THEN("Output string is G1 F1093210.000") { - REQUIRE_THAT(writer.set_speed(1.09321e+06), Catch::Equals("G1 F1093210.000\n")); + //max in assert is 100k + //WHEN("set_speed is called to set speed to 1.09321e+06") { + // THEN("Output string is G1 F1093210.000") { + // REQUIRE_THAT(writer.set_speed(1.09321e+06), Catch::Equals("G1 F1093210.000\n")); + // } + //} + WHEN("set_speed is called to set speed to 9.99321e+04") { + THEN("Output string is G1 F99932.100") { + REQUIRE_THAT(writer.set_speed(9.99321e+04), Catch::Equals("G1 F10932.100\n")); } } WHEN("set_speed is called to set speed to 1") {