Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-10-25 19:23:42 +0300
committerbubnikv <bubnikv@gmail.com>2019-10-25 19:23:42 +0300
commit2e7e95adaec3ce8b24e8d47f4432c392be7acb23 (patch)
treee5b3f5261138efd8c9c1bfd0051b696dcb8c52f1 /tests/fff_print
parentf8dc74374c9f64e0f09c01b811deb3b4457598df (diff)
Disabled broken tests, ported some more tests to C++,
removed Perl tests that were already ported to C++.
Diffstat (limited to 'tests/fff_print')
-rw-r--r--tests/fff_print/CMakeLists.txt1
-rw-r--r--tests/fff_print/test_gcode.cpp22
-rw-r--r--tests/fff_print/test_skirt_brim.cpp8
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/fff_print/CMakeLists.txt b/tests/fff_print/CMakeLists.txt
index 32ae9757a..75a9c3137 100644
--- a/tests/fff_print/CMakeLists.txt
+++ b/tests/fff_print/CMakeLists.txt
@@ -6,6 +6,7 @@ add_executable(${_TEST_NAME}_tests
test_extrusion_entity.cpp
test_fill.cpp
test_flow.cpp
+ test_gcode.cpp
test_gcodewriter.cpp
test_model.cpp
test_print.cpp
diff --git a/tests/fff_print/test_gcode.cpp b/tests/fff_print/test_gcode.cpp
new file mode 100644
index 000000000..34b40d1ff
--- /dev/null
+++ b/tests/fff_print/test_gcode.cpp
@@ -0,0 +1,22 @@
+#include <catch2/catch.hpp>
+
+#include <memory>
+
+#include "libslic3r/GCode.hpp"
+
+using namespace Slic3r;
+
+SCENARIO("Origin manipulation", "[GCode]") {
+ Slic3r::GCode gcodegen;
+ WHEN("set_origin to (10,0)") {
+ gcodegen.set_origin(Vec2d(10,0));
+ REQUIRE(gcodegen.origin() == Vec2d(10, 0));
+ }
+ WHEN("set_origin to (10,0) and translate by (5, 5)") {
+ gcodegen.set_origin(Vec2d(10,0));
+ gcodegen.set_origin(gcodegen.origin() + Vec2d(5, 5));
+ THEN("origin returns reference to point") {
+ REQUIRE(gcodegen.origin() == Vec2d(15,5));
+ }
+ }
+}
diff --git a/tests/fff_print/test_skirt_brim.cpp b/tests/fff_print/test_skirt_brim.cpp
index 11a83fe29..097f72dcc 100644
--- a/tests/fff_print/test_skirt_brim.cpp
+++ b/tests/fff_print/test_skirt_brim.cpp
@@ -119,6 +119,8 @@ SCENARIO("Original Slic3r Skirt/Brim tests", "[SkirtBrim]") {
}
}
+#if 0
+ // This is a real error! One shall print the brim with the external perimeter extruder!
WHEN("Perimeter extruder = 2 and support extruders = 3") {
THEN("Brim is printed with the extruder used for the perimeters of first object") {
config.set_deserialize({
@@ -148,6 +150,8 @@ SCENARIO("Original Slic3r Skirt/Brim tests", "[SkirtBrim]") {
REQUIRE(tool == config.opt_int("support_material_extruder") - 1);
}
}
+#endif
+
WHEN("brim width to 1 with layer_width of 0.5") {
config.set_deserialize({
{ "skirts", 0 },
@@ -215,6 +219,8 @@ SCENARIO("Original Slic3r Skirt/Brim tests", "[SkirtBrim]") {
// config.set("support_material", true); // to prevent speeds to be altered
+#if 0
+ // This test is not finished.
THEN("skirt length is large enough to contain object with support") {
CHECK(config.opt_bool("support_material")); // test is not valid if support material is off
std::string gcode = Slic3r::Test::slice({TestMesh::cube_20x20x20}, config);
@@ -248,6 +254,8 @@ SCENARIO("Original Slic3r Skirt/Brim tests", "[SkirtBrim]") {
double hull_perimeter = unscale<double>(convex_hull.split_at_first_point().length());
REQUIRE(skirt_length > hull_perimeter);
}
+#endif
+
}
WHEN("Large minimum skirt length is used.") {
config.set("min_skirt_length", 20);