PrusaSlicer-NonPlainar/tests/fff_print/test_gcode.cpp
bubnikv 2e7e95adae Disabled broken tests, ported some more tests to C++,
removed Perl tests that were already ported to C++.
2019-10-25 18:23:42 +02:00

23 lines
559 B
C++

#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));
}
}
}