mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Ported test_print/test_printobject/test_3mf from upstream Slic3r, thanks @lordofhyphens
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
||||
add_executable(${_TEST_NAME}_tests
|
||||
${_TEST_NAME}_tests.cpp
|
||||
test_3mf.cpp
|
||||
test_geometry.cpp
|
||||
test_polygon.cpp
|
||||
)
|
||||
|
||||
20
tests/libslic3r/test_3mf.cpp
Normal file
20
tests/libslic3r/test_3mf.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/Format/3mf.hpp"
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
SCENARIO("Reading 3mf file") {
|
||||
GIVEN("umlauts in the path of the file") {
|
||||
Slic3r::Model model;
|
||||
WHEN("3mf model is read") {
|
||||
std::string path = std::string(TEST_DATA_DIR) + "/test_3mf/Geräte/Büchse.3mf";
|
||||
DynamicPrintConfig config;
|
||||
bool ret = Slic3r::load_3mf(path.c_str(), &config, &model, false);
|
||||
THEN("load should succeed") {
|
||||
REQUIRE(ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user