From 5be84c56b334423a9ec473c86d3bf1ea1a6680a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0ach?= Date: Mon, 6 Jan 2025 16:12:06 +0100 Subject: [PATCH] Remove invalid usage of std::filesystem in tests. The std::filesystem::path methods cannot be compiled for macOS 10.12. It did not manifest because we compile the tests only on arm where the target is 11.0. --- tests/fff_print/test_data.hpp | 10 +++++----- tests/fff_print/test_seam_perimeters.cpp | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/fff_print/test_data.hpp b/tests/fff_print/test_data.hpp index 9eee9c9d2e..ac0548bc6d 100644 --- a/tests/fff_print/test_data.hpp +++ b/tests/fff_print/test_data.hpp @@ -14,7 +14,7 @@ #include "libslic3r/GCode/SeamPlacer.hpp" #include "libslic3r/GCode/SeamAligned.hpp" -#include +#include #include namespace Slic3r { namespace Test { @@ -159,7 +159,7 @@ std::string slice( bool contains(const std::string &data, const std::string &pattern); bool contains_regex(const std::string &data, const std::string &pattern); -inline std::unique_ptr process_3mf(const std::filesystem::path &path) { +inline std::unique_ptr process_3mf(const boost::filesystem::path &path) { DynamicPrintConfig config; auto print{std::make_unique()}; Model model; @@ -176,7 +176,7 @@ inline std::unique_ptr process_3mf(const std::filesystem::path &path) { static std::map> prints_3mfs; // Lazy getter, to avoid processing the 3mf multiple times, it already takes ages. -inline Print *get_print(const std::filesystem::path &file_path) { +inline Print *get_print(const boost::filesystem::path &file_path) { if (!prints_3mfs.count(file_path.string())) { prints_3mfs[file_path.string()] = process_3mf(file_path.string()); } @@ -204,8 +204,8 @@ inline void serialize_seam(std::ostream &output, const std::vectorobjects()[0]}; diff --git a/tests/fff_print/test_seam_perimeters.cpp b/tests/fff_print/test_seam_perimeters.cpp index 245b3b3291..844b60d73d 100644 --- a/tests/fff_print/test_seam_perimeters.cpp +++ b/tests/fff_print/test_seam_perimeters.cpp @@ -89,8 +89,6 @@ TEST_CASE("Perimeter constructs KD trees", "[Seams][SeamPerimeters]") { CHECK(perimeter.common_points.embedded_points); } -using std::filesystem::path; - constexpr const char *to_string(Perimeters::PointType point_type) { using Perimeters::PointType;