mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:25:57 +08:00
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.
This commit is contained in:
parent
936e203294
commit
5be84c56b3
@ -14,7 +14,7 @@
|
|||||||
#include "libslic3r/GCode/SeamPlacer.hpp"
|
#include "libslic3r/GCode/SeamPlacer.hpp"
|
||||||
#include "libslic3r/GCode/SeamAligned.hpp"
|
#include "libslic3r/GCode/SeamAligned.hpp"
|
||||||
|
|
||||||
#include <filesystem>
|
#include <boost/filesystem.hpp>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Slic3r { namespace Test {
|
namespace Slic3r { namespace Test {
|
||||||
@ -159,7 +159,7 @@ std::string slice(
|
|||||||
bool contains(const std::string &data, const std::string &pattern);
|
bool contains(const std::string &data, const std::string &pattern);
|
||||||
bool contains_regex(const std::string &data, const std::string &pattern);
|
bool contains_regex(const std::string &data, const std::string &pattern);
|
||||||
|
|
||||||
inline std::unique_ptr<Print> process_3mf(const std::filesystem::path &path) {
|
inline std::unique_ptr<Print> process_3mf(const boost::filesystem::path &path) {
|
||||||
DynamicPrintConfig config;
|
DynamicPrintConfig config;
|
||||||
auto print{std::make_unique<Print>()};
|
auto print{std::make_unique<Print>()};
|
||||||
Model model;
|
Model model;
|
||||||
@ -176,7 +176,7 @@ inline std::unique_ptr<Print> process_3mf(const std::filesystem::path &path) {
|
|||||||
|
|
||||||
static std::map<std::string, std::unique_ptr<Print>> prints_3mfs;
|
static std::map<std::string, std::unique_ptr<Print>> prints_3mfs;
|
||||||
// Lazy getter, to avoid processing the 3mf multiple times, it already takes ages.
|
// 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())) {
|
if (!prints_3mfs.count(file_path.string())) {
|
||||||
prints_3mfs[file_path.string()] = process_3mf(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::vector<std::vector<S
|
|||||||
|
|
||||||
struct SeamsFixture
|
struct SeamsFixture
|
||||||
{
|
{
|
||||||
const std::filesystem::path file_3mf{
|
const boost::filesystem::path file_3mf{
|
||||||
std::filesystem::path{TEST_DATA_DIR} / std::filesystem::path{"seam_test_object.3mf"}};
|
boost::filesystem::path{TEST_DATA_DIR} / boost::filesystem::path{"seam_test_object.3mf"}};
|
||||||
const Print *print{Test::get_print(file_3mf)};
|
const Print *print{Test::get_print(file_3mf)};
|
||||||
const PrintObject *print_object{print->objects()[0]};
|
const PrintObject *print_object{print->objects()[0]};
|
||||||
|
|
||||||
|
@ -89,8 +89,6 @@ TEST_CASE("Perimeter constructs KD trees", "[Seams][SeamPerimeters]") {
|
|||||||
CHECK(perimeter.common_points.embedded_points);
|
CHECK(perimeter.common_points.embedded_points);
|
||||||
}
|
}
|
||||||
|
|
||||||
using std::filesystem::path;
|
|
||||||
|
|
||||||
constexpr const char *to_string(Perimeters::PointType point_type) {
|
constexpr const char *to_string(Perimeters::PointType point_type) {
|
||||||
using Perimeters::PointType;
|
using Perimeters::PointType;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user