diff --git a/deps/+Catch2/Catch2.cmake b/deps/+Catch2/Catch2.cmake index b355f16add..23c4a69dd2 100644 --- a/deps/+Catch2/Catch2.cmake +++ b/deps/+Catch2/Catch2.cmake @@ -1,6 +1,7 @@ add_cmake_project(Catch2 - URL "https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.10.zip" - URL_HASH SHA256=121e7488912c2ce887bfe4699ebfb983d0f2e0d68bcd60434cdfd6bb0cf78b43 + URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.8.0.zip" + URL_HASH SHA256=bffd2c45a84e5a4b0c17e695798e8d2f65931cbaf5c7556d40388d1d8d04eb83 CMAKE_ARGS -DCATCH_BUILD_TESTING:BOOL=OFF + -DCMAKE_CXX_STANDARD=17 ) \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 82027558cc..c4d3f16c2f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ # TODO Add individual tests as executables in separate directories # add_subirectory() -find_package(Catch2 2.9 REQUIRED) +find_package(Catch2 3.8 REQUIRED) include(Catch) @@ -13,7 +13,7 @@ set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.") add_library(test_common INTERFACE) target_include_directories(test_common INTERFACE ${CMAKE_CURRENT_LIST_DIR}) target_compile_definitions(test_common INTERFACE TEST_DATA_DIR=R"\(${TEST_DATA_DIR}\)" CATCH_CONFIG_FAST_COMPILE) -target_link_libraries(test_common INTERFACE Catch2::Catch2) +target_link_libraries(test_common INTERFACE Catch2::Catch2WithMain) if (APPLE) target_link_libraries(test_common INTERFACE "-liconv -framework IOKit" "-framework CoreFoundation" -lc++) diff --git a/tests/arrange/test_arrange.cpp b/tests/arrange/test_arrange.cpp index c418bbb864..6a67da001f 100644 --- a/tests/arrange/test_arrange.cpp +++ b/tests/arrange/test_arrange.cpp @@ -1,4 +1,7 @@ -#include +#include +#include +#include +#include #include "test_utils.hpp" #include @@ -36,6 +39,8 @@ #include +using namespace Catch; + template static std::vector prusa_parts(double infl = 0.) { using namespace Slic3r; diff --git a/tests/arrange/test_arrange_integration.cpp b/tests/arrange/test_arrange_integration.cpp index 0f919693d3..e19365c25f 100644 --- a/tests/arrange/test_arrange_integration.cpp +++ b/tests/arrange/test_arrange_integration.cpp @@ -1,4 +1,11 @@ -#include +#include +#include +#include +#include +#include +#include +#include + #include "test_utils.hpp" #include @@ -11,6 +18,8 @@ #include "libslic3r/Geometry/ConvexHull.hpp" #include "libslic3r/Format/3mf.hpp" +using namespace Catch; + static Slic3r::Model get_example_model_with_20mm_cube() { using namespace Slic3r; diff --git a/tests/catch_main.hpp b/tests/catch_main.hpp index ca5b47da84..ef4bf2d964 100644 --- a/tests/catch_main.hpp +++ b/tests/catch_main.hpp @@ -4,46 +4,53 @@ #define CATCH_CONFIG_EXTERNAL_INTERFACES #define CATCH_CONFIG_MAIN // #define CATCH_CONFIG_DEFAULT_REPORTER "verboseconsole" -#include +#include + +#include namespace Catch { -struct VerboseConsoleReporter : public ConsoleReporter { +struct VerboseConsoleReporter : public StreamingReporterBase { double duration = 0.; - using ConsoleReporter::ConsoleReporter; + using StreamingReporterBase::StreamingReporterBase; + + static std::string getDescription() { + return "Verbose Console Reporter"; + } + void testCaseStarting(TestCaseInfo const& _testInfo) override { - Colour::use(Colour::Cyan); - stream << "Testing "; - Colour::use(Colour::None); - stream << _testInfo.name << std::endl; - ConsoleReporter::testCaseStarting(_testInfo); + //Colour::use(Colour::Cyan); + m_stream << "Testing "; + //Colour::use(Colour::None); + m_stream << _testInfo.name << std::endl; + StreamingReporterBase::testCaseStarting(_testInfo); } void sectionStarting(const SectionInfo &_sectionInfo) override { if (_sectionInfo.name != currentTestCaseInfo->name) - stream << _sectionInfo.name << std::endl; + m_stream << _sectionInfo.name << std::endl; - ConsoleReporter::sectionStarting(_sectionInfo); + StreamingReporterBase::sectionStarting(_sectionInfo); } void sectionEnded(const SectionStats &_sectionStats) override { duration += _sectionStats.durationInSeconds; - ConsoleReporter::sectionEnded(_sectionStats); + StreamingReporterBase::sectionEnded(_sectionStats); } void testCaseEnded(TestCaseStats const& stats) override { if (stats.totals.assertions.allOk()) { - Colour::use(Colour::BrightGreen); - stream << "Passed"; - Colour::use(Colour::None); - stream << " in " << duration << " [seconds]\n" << std::endl; + //Colour::use(Colour::BrightGreen); + m_stream << "Passed"; + //Colour::use(Colour::None); + m_stream << " in " << duration << " [seconds]\n" << std::endl; } duration = 0.; - ConsoleReporter::testCaseEnded(stats); + StreamingReporterBase::testCaseEnded(stats); } }; diff --git a/tests/fff_print/benchmark_seams.cpp b/tests/fff_print/benchmark_seams.cpp index 8eeeb9c120..708e3c180f 100644 --- a/tests/fff_print/benchmark_seams.cpp +++ b/tests/fff_print/benchmark_seams.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include "test_data.hpp" #include "libslic3r/GCode/SeamGeometry.hpp" diff --git a/tests/fff_print/test_avoid_crossing_perimeters.cpp b/tests/fff_print/test_avoid_crossing_perimeters.cpp index a76ac12b53..fb498c9034 100644 --- a/tests/fff_print/test_avoid_crossing_perimeters.cpp +++ b/tests/fff_print/test_avoid_crossing_perimeters.cpp @@ -1,4 +1,4 @@ -#include +#include #include "test_data.hpp" diff --git a/tests/fff_print/test_bridges.cpp b/tests/fff_print/test_bridges.cpp index 91ab9b6b29..817ea7cad0 100644 --- a/tests/fff_print/test_bridges.cpp +++ b/tests/fff_print/test_bridges.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_cancel_object.cpp b/tests/fff_print/test_cancel_object.cpp index 3e0b0e03ac..bd5ce8279a 100644 --- a/tests/fff_print/test_cancel_object.cpp +++ b/tests/fff_print/test_cancel_object.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -7,6 +8,7 @@ using namespace Slic3r; using namespace Test; +using namespace Catch; constexpr bool debug_files{false}; diff --git a/tests/fff_print/test_clipper.cpp b/tests/fff_print/test_clipper.cpp index 5968769752..0e242353de 100644 --- a/tests/fff_print/test_clipper.cpp +++ b/tests/fff_print/test_clipper.cpp @@ -1,4 +1,4 @@ -#include +#include #include "test_data.hpp" #include "libslic3r/ClipperZUtils.hpp" diff --git a/tests/fff_print/test_cooling.cpp b/tests/fff_print/test_cooling.cpp index 187d7f4394..62b74cc67e 100644 --- a/tests/fff_print/test_cooling.cpp +++ b/tests/fff_print/test_cooling.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_custom_gcode.cpp b/tests/fff_print/test_custom_gcode.cpp index 2dd97e9c35..bbac8166e4 100644 --- a/tests/fff_print/test_custom_gcode.cpp +++ b/tests/fff_print/test_custom_gcode.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_data.cpp b/tests/fff_print/test_data.cpp index 9dbd1c7f66..65ee9d9597 100644 --- a/tests/fff_print/test_data.cpp +++ b/tests/fff_print/test_data.cpp @@ -1,3 +1,4 @@ +#include #include "test_data.hpp" #include "libslic3r/TriangleMesh.hpp" @@ -399,7 +400,6 @@ bool contains_regex(const std::string &data, const std::string &pattern) } } // namespace Slic3r::Test -#include SCENARIO("init_print functionality", "[test_data]") { GIVEN("A default config") { diff --git a/tests/fff_print/test_extrusion_entity.cpp b/tests/fff_print/test_extrusion_entity.cpp index 0698f5eb90..33ca3f4cce 100644 --- a/tests/fff_print/test_extrusion_entity.cpp +++ b/tests/fff_print/test_extrusion_entity.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include @@ -11,6 +12,7 @@ #include "test_data.hpp" using namespace Slic3r; +using namespace Catch; static inline Slic3r::Point random_point(float LO=-50, float HI=50) { diff --git a/tests/fff_print/test_fill.cpp b/tests/fff_print/test_fill.cpp index 94b6cab153..2047d39aa5 100644 --- a/tests/fff_print/test_fill.cpp +++ b/tests/fff_print/test_fill.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_flow.cpp b/tests/fff_print/test_flow.cpp index b24b59cc61..037c17c5a2 100644 --- a/tests/fff_print/test_flow.cpp +++ b/tests/fff_print/test_flow.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -12,6 +13,7 @@ using namespace Slic3r::Test; using namespace Slic3r; +using namespace Catch; SCENARIO("Extrusion width specifics", "[Flow]") { diff --git a/tests/fff_print/test_gaps.cpp b/tests/fff_print/test_gaps.cpp index a096087ce6..d1f921c186 100644 --- a/tests/fff_print/test_gaps.cpp +++ b/tests/fff_print/test_gaps.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/GCodeReader.hpp" #include "libslic3r/Geometry/ConvexHull.hpp" diff --git a/tests/fff_print/test_gcode.cpp b/tests/fff_print/test_gcode.cpp index 30d3e29d29..798807e7d9 100644 --- a/tests/fff_print/test_gcode.cpp +++ b/tests/fff_print/test_gcode.cpp @@ -2,7 +2,8 @@ * Mostly ported from t/gcode.t */ -#include +#include +#include #include #include @@ -14,6 +15,7 @@ using namespace Slic3r; using namespace Test; +using namespace Catch; constexpr bool debug_files = false; @@ -65,7 +67,7 @@ TEST_CASE("Wiping speeds", "[GCode]") { INFO("Wipe moves don\'t retract faster than configured speed"); CHECK(retract_speed < expected_retract_speed); } - INFO("No wiping after layer change") + INFO("No wiping after layer change"); CHECK(!wiping_on_new_layer); } diff --git a/tests/fff_print/test_gcode_travels.cpp b/tests/fff_print/test_gcode_travels.cpp index 895c415c86..95d9d64346 100644 --- a/tests/fff_print/test_gcode_travels.cpp +++ b/tests/fff_print/test_gcode_travels.cpp @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include #include #include @@ -6,8 +8,9 @@ using namespace Slic3r; using namespace Slic3r::GCode::Impl::Travels; +using namespace Catch; -struct ApproxEqualsPoints : public Catch::MatcherBase { +struct ApproxEqualsPoints : public Catch::Matchers::MatcherBase { ApproxEqualsPoints(const Points& expected, unsigned tolerance): expected(expected), tolerance(tolerance) {} bool match(const Points& points) const override { if (points.size() != expected.size()) { diff --git a/tests/fff_print/test_gcodefindreplace.cpp b/tests/fff_print/test_gcodefindreplace.cpp index 1d714d1c33..d6c72a8b42 100644 --- a/tests/fff_print/test_gcodefindreplace.cpp +++ b/tests/fff_print/test_gcodefindreplace.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/tests/fff_print/test_gcodewriter.cpp b/tests/fff_print/test_gcodewriter.cpp index 93888a988f..bba09ea911 100644 --- a/tests/fff_print/test_gcodewriter.cpp +++ b/tests/fff_print/test_gcodewriter.cpp @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include @@ -12,22 +14,22 @@ SCENARIO("set_speed emits values with fixed-point output.", "[GCodeWriter]") { GCodeWriter writer; WHEN("set_speed is called to set speed to 99999.123") { THEN("Output string is G1 F99999.123") { - REQUIRE_THAT(writer.set_speed(99999.123), Catch::Equals("G1 F99999.123\n")); + REQUIRE_THAT(writer.set_speed(99999.123), Catch::Matchers::Equals("G1 F99999.123\n")); } } WHEN("set_speed is called to set speed to 1") { THEN("Output string is G1 F1") { - REQUIRE_THAT(writer.set_speed(1.0), Catch::Equals("G1 F1\n")); + REQUIRE_THAT(writer.set_speed(1.0), Catch::Matchers::Equals("G1 F1\n")); } } WHEN("set_speed is called to set speed to 203.200022") { THEN("Output string is G1 F203.2") { - REQUIRE_THAT(writer.set_speed(203.200022), Catch::Equals("G1 F203.2\n")); + REQUIRE_THAT(writer.set_speed(203.200022), Catch::Matchers::Equals("G1 F203.2\n")); } } WHEN("set_speed is called to set speed to 203.200522") { THEN("Output string is G1 F203.201") { - REQUIRE_THAT(writer.set_speed(203.200522), Catch::Equals("G1 F203.201\n")); + REQUIRE_THAT(writer.set_speed(203.200522), Catch::Matchers::Equals("G1 F203.201\n")); } } } diff --git a/tests/fff_print/test_layers.cpp b/tests/fff_print/test_layers.cpp index 87accd3aaf..596a9f6ebb 100644 --- a/tests/fff_print/test_layers.cpp +++ b/tests/fff_print/test_layers.cpp @@ -2,11 +2,13 @@ * Ported from t/layers.t */ -#include +#include +#include #include "test_data.hpp" using namespace Slic3r; using namespace Slic3r::Test; +using namespace Catch; void check_layers(const DynamicPrintConfig& config) { GCodeReader parser; @@ -27,10 +29,10 @@ void check_layers(const DynamicPrintConfig& config) { const double layer_height = config.opt_float("layer_height"); INFO("Correct first layer height."); CHECK(z.at(0) == Approx(first_layer_height + z_offset)); - INFO("Correct second layer height") + INFO("Correct second layer height"); CHECK(z.at(1) == Approx(first_layer_height + layer_height + z_offset)); - INFO("Correct layer height") + INFO("Correct layer height"); for (const double increment : tcb::span{increments}.subspan(1)) { CHECK(increment == Approx(layer_height)); } diff --git a/tests/fff_print/test_model.cpp b/tests/fff_print/test_model.cpp index 2f61425c20..8789025890 100644 --- a/tests/fff_print/test_model.cpp +++ b/tests/fff_print/test_model.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/libslic3r.h" #include "libslic3r/Model.hpp" diff --git a/tests/fff_print/test_multi.cpp b/tests/fff_print/test_multi.cpp index 3e69c6822e..b8941955ce 100644 --- a/tests/fff_print/test_multi.cpp +++ b/tests/fff_print/test_multi.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_perimeters.cpp b/tests/fff_print/test_perimeters.cpp index fadebe76d4..905dccc079 100644 --- a/tests/fff_print/test_perimeters.cpp +++ b/tests/fff_print/test_perimeters.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_print.cpp b/tests/fff_print/test_print.cpp index 204f3f8e0d..f1579b31e0 100644 --- a/tests/fff_print/test_print.cpp +++ b/tests/fff_print/test_print.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/libslic3r.h" #include "libslic3r/Print.hpp" diff --git a/tests/fff_print/test_printgcode.cpp b/tests/fff_print/test_printgcode.cpp index 2a45bd2003..d3be9c8f42 100644 --- a/tests/fff_print/test_printgcode.cpp +++ b/tests/fff_print/test_printgcode.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include "libslic3r/libslic3r.h" #include "libslic3r/GCodeReader.hpp" @@ -10,6 +11,7 @@ using namespace Slic3r; using namespace Slic3r::Test; +using namespace Catch; boost::regex perimeters_regex("G1 X[-0-9.]* Y[-0-9.]* E[-0-9.]* ; perimeter"); boost::regex infill_regex("G1 X[-0-9.]* Y[-0-9.]* E[-0-9.]* ; infill"); diff --git a/tests/fff_print/test_printobject.cpp b/tests/fff_print/test_printobject.cpp index cbc47345c7..d329b0f98e 100644 --- a/tests/fff_print/test_printobject.cpp +++ b/tests/fff_print/test_printobject.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include "libslic3r/libslic3r.h" #include "libslic3r/Print.hpp" @@ -8,6 +9,7 @@ using namespace Slic3r; using namespace Slic3r::Test; +using namespace Catch; SCENARIO("PrintObject: object layer heights", "[PrintObject]") { GIVEN("20mm cube and default initial config, initial layer height of 2mm") { diff --git a/tests/fff_print/test_retraction.cpp b/tests/fff_print/test_retraction.cpp index 5efbfcc000..502f855a8f 100644 --- a/tests/fff_print/test_retraction.cpp +++ b/tests/fff_print/test_retraction.cpp @@ -2,7 +2,8 @@ * Ported from t/retraction.t */ -#include +#include +#include #include #include @@ -13,6 +14,7 @@ using namespace Slic3r; using namespace Test; +using namespace Catch; constexpr bool debug_files {false}; @@ -77,7 +79,7 @@ void check_gcode(std::initializer_list meshes, const DynamicPrintConfi lift_dist = line.dist_Z(self); } if (line.dist_Z(self) < 0) { - INFO("Must be lifted before going down.") + INFO("Must be lifted before going down."); CHECK(lifted); INFO("Going down by the same amount of the lift or by the amount needed to get to next layer"); CHECK(( diff --git a/tests/fff_print/test_seam_aligned.cpp b/tests/fff_print/test_seam_aligned.cpp index 33080e749e..04d9a34bd1 100644 --- a/tests/fff_print/test_seam_aligned.cpp +++ b/tests/fff_print/test_seam_aligned.cpp @@ -1,11 +1,13 @@ #include -#include +#include +#include #include #include "test_data.hpp" #include using namespace Slic3r; using namespace Slic3r::Seams; +using namespace Catch; constexpr bool debug_files{false}; diff --git a/tests/fff_print/test_seam_geometry.cpp b/tests/fff_print/test_seam_geometry.cpp index 67dcc3e3c3..688cbc7d4a 100644 --- a/tests/fff_print/test_seam_geometry.cpp +++ b/tests/fff_print/test_seam_geometry.cpp @@ -1,9 +1,12 @@ #include -#include +#include +#include +#include #include #include using namespace Slic3r; +using namespace Catch; TEST_CASE("Lists mapping", "[Seams][SeamGeometry]") { // clang-format off diff --git a/tests/fff_print/test_seam_perimeters.cpp b/tests/fff_print/test_seam_perimeters.cpp index 844b60d73d..76bef83205 100644 --- a/tests/fff_print/test_seam_perimeters.cpp +++ b/tests/fff_print/test_seam_perimeters.cpp @@ -2,7 +2,8 @@ #include "libslic3r/GCode/SeamPerimeters.hpp" #include "libslic3r/Layer.hpp" #include "libslic3r/Point.hpp" -#include +#include +#include #include #include #include @@ -11,6 +12,7 @@ using namespace Slic3r; using namespace Slic3r::Seams; +using namespace Catch; constexpr bool debug_files{false}; diff --git a/tests/fff_print/test_seam_random.cpp b/tests/fff_print/test_seam_random.cpp index cd9514619e..65f7c91d7b 100644 --- a/tests/fff_print/test_seam_random.cpp +++ b/tests/fff_print/test_seam_random.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include "test_data.hpp" #include diff --git a/tests/fff_print/test_seam_rear.cpp b/tests/fff_print/test_seam_rear.cpp index fc183a3ce7..e23d742eb3 100644 --- a/tests/fff_print/test_seam_rear.cpp +++ b/tests/fff_print/test_seam_rear.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include "test_data.hpp" #include diff --git a/tests/fff_print/test_seam_scarf.cpp b/tests/fff_print/test_seam_scarf.cpp index 2f9b727cc8..f1a37701a1 100644 --- a/tests/fff_print/test_seam_scarf.cpp +++ b/tests/fff_print/test_seam_scarf.cpp @@ -1,9 +1,11 @@ -#include +#include +#include #include #include using namespace Slic3r; using Seams::Scarf::Impl::PathPoint; +using namespace Catch; TEST_CASE("Get path point", "[Seams][Scarf]") { using Seams::Scarf::Impl::get_path_point; diff --git a/tests/fff_print/test_seam_shells.cpp b/tests/fff_print/test_seam_shells.cpp index cbc0cfaf83..56d57a9d3a 100644 --- a/tests/fff_print/test_seam_shells.cpp +++ b/tests/fff_print/test_seam_shells.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include #include "libslic3r/ClipperUtils.hpp" @@ -9,6 +10,7 @@ using namespace Slic3r; using namespace Slic3r::Seams; +using namespace Catch; struct ProjectionFixture { diff --git a/tests/fff_print/test_shells.cpp b/tests/fff_print/test_shells.cpp index fcb3a49f28..ff696a95f2 100644 --- a/tests/fff_print/test_shells.cpp +++ b/tests/fff_print/test_shells.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/GCodeReader.hpp" diff --git a/tests/fff_print/test_skirt_brim.cpp b/tests/fff_print/test_skirt_brim.cpp index 655517220a..3ee7b35ef8 100644 --- a/tests/fff_print/test_skirt_brim.cpp +++ b/tests/fff_print/test_skirt_brim.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include "libslic3r/GCodeReader.hpp" #include "libslic3r/Config.hpp" @@ -10,6 +11,7 @@ using namespace Slic3r::Test; using namespace Slic3r; +using namespace Catch; /// Helper method to find the tool used for the brim (always the first extrusion) static int get_brim_tool(const std::string &gcode) diff --git a/tests/fff_print/test_support_material.cpp b/tests/fff_print/test_support_material.cpp index 0720b270cb..56ee30bb8a 100644 --- a/tests/fff_print/test_support_material.cpp +++ b/tests/fff_print/test_support_material.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/GCodeReader.hpp" #include "libslic3r/Layer.hpp" diff --git a/tests/fff_print/test_thin_walls.cpp b/tests/fff_print/test_thin_walls.cpp index 59fb6b080d..885893bce5 100644 --- a/tests/fff_print/test_thin_walls.cpp +++ b/tests/fff_print/test_thin_walls.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/fff_print/test_trianglemesh.cpp b/tests/fff_print/test_trianglemesh.cpp index eff39ed351..269b56d02c 100644 --- a/tests/fff_print/test_trianglemesh.cpp +++ b/tests/fff_print/test_trianglemesh.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/TriangleMesh.hpp" #include "libslic3r/TriangleMeshSlicer.hpp" diff --git a/tests/libslic3r/test_3mf.cpp b/tests/libslic3r/test_3mf.cpp index dc9a3d55c7..54c1cfc3da 100644 --- a/tests/libslic3r/test_3mf.cpp +++ b/tests/libslic3r/test_3mf.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Model.hpp" #include "libslic3r/Format/3mf.hpp" diff --git a/tests/libslic3r/test_aabbindirect.cpp b/tests/libslic3r/test_aabbindirect.cpp index 3a93eb908f..36b3593add 100644 --- a/tests/libslic3r/test_aabbindirect.cpp +++ b/tests/libslic3r/test_aabbindirect.cpp @@ -1,5 +1,6 @@ #include -#include +#include +#include #include #include @@ -7,6 +8,7 @@ #include using namespace Slic3r; +using namespace Catch; TEST_CASE("Building a tree over a box, ray caster and closest query", "[AABBIndirect]") { diff --git a/tests/libslic3r/test_anyptr.cpp b/tests/libslic3r/test_anyptr.cpp index d7b00a021c..f53e886061 100644 --- a/tests/libslic3r/test_anyptr.cpp +++ b/tests/libslic3r/test_anyptr.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/libslic3r/test_arachne.cpp b/tests/libslic3r/test_arachne.cpp index b0a3cb3ebd..1e43a7c896 100644 --- a/tests/libslic3r/test_arachne.cpp +++ b/tests/libslic3r/test_arachne.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Arachne/WallToolPaths.hpp" #include "libslic3r/ClipperUtils.hpp" diff --git a/tests/libslic3r/test_arc_welder.cpp b/tests/libslic3r/test_arc_welder.cpp index 35eda98a77..172412301b 100644 --- a/tests/libslic3r/test_arc_welder.cpp +++ b/tests/libslic3r/test_arc_welder.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -12,6 +13,7 @@ #include using namespace Slic3r; +using namespace Catch; TEST_CASE("arc basics", "[ArcWelder]") { using namespace Slic3r::Geometry; diff --git a/tests/libslic3r/test_astar.cpp b/tests/libslic3r/test_astar.cpp index 4e540c3c1e..615c25f159 100644 --- a/tests/libslic3r/test_astar.cpp +++ b/tests/libslic3r/test_astar.cpp @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include "libslic3r/BoundingBox.hpp" #include "libslic3r/AStar.hpp" @@ -6,6 +8,7 @@ #include "libslic3r/PointGrid.hpp" using namespace Slic3r; +using namespace Catch; TEST_CASE("Testing basic invariants of AStar", "[AStar]") { struct DummyTracer { diff --git a/tests/libslic3r/test_clipper_offset.cpp b/tests/libslic3r/test_clipper_offset.cpp index 8209d99bf7..dc64a0491c 100644 --- a/tests/libslic3r/test_clipper_offset.cpp +++ b/tests/libslic3r/test_clipper_offset.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -8,6 +9,7 @@ #include "libslic3r/SVG.hpp" using namespace Slic3r; +using namespace Catch; // #define TESTS_EXPORT_SVGS diff --git a/tests/libslic3r/test_clipper_utils.cpp b/tests/libslic3r/test_clipper_utils.cpp index 1f3bc0fdca..c5ab927539 100644 --- a/tests/libslic3r/test_clipper_utils.cpp +++ b/tests/libslic3r/test_clipper_utils.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -9,6 +10,7 @@ #include "libslic3r/SVG.hpp" using namespace Slic3r; +using namespace Catch; SCENARIO("Various Clipper operations - xs/t/11_clipper.t", "[ClipperUtils]") { // CCW oriented contour diff --git a/tests/libslic3r/test_color.cpp b/tests/libslic3r/test_color.cpp index bb35f5e38e..2df18e0c6c 100644 --- a/tests/libslic3r/test_color.cpp +++ b/tests/libslic3r/test_color.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/libslic3r.h" #include "libslic3r/Color.hpp" diff --git a/tests/libslic3r/test_config.cpp b/tests/libslic3r/test_config.cpp index fea5068588..309893d7bc 100644 --- a/tests/libslic3r/test_config.cpp +++ b/tests/libslic3r/test_config.cpp @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include "libslic3r/Config.hpp" #include "libslic3r/PrintConfig.hpp" diff --git a/tests/libslic3r/test_curve_fitting.cpp b/tests/libslic3r/test_curve_fitting.cpp index faf7839c77..9510dcd30f 100644 --- a/tests/libslic3r/test_curve_fitting.cpp +++ b/tests/libslic3r/test_curve_fitting.cpp @@ -1,10 +1,13 @@ -#include +#include +#include #include #include #include #include +using namespace Catch; + TEST_CASE("Curves: cubic b spline fit test", "[Curves]") { using namespace Slic3r; using namespace Slic3r::Geometry; diff --git a/tests/libslic3r/test_cut_surface.cpp b/tests/libslic3r/test_cut_surface.cpp index d9376195b5..0cbde23e1d 100644 --- a/tests/libslic3r/test_cut_surface.cpp +++ b/tests/libslic3r/test_cut_surface.cpp @@ -1,10 +1,10 @@ -#include +#include #include #include // its_make_cube + its_merge using namespace Slic3r; -TEST_CASE("Cut character from surface", "[]") +TEST_CASE("Cut character from surface", "[Emboss]") { std::string font_path = std::string(TEST_DATA_DIR) + "/../../resources/fonts/NotoSans-Regular.ttf"; diff --git a/tests/libslic3r/test_elephant_foot_compensation.cpp b/tests/libslic3r/test_elephant_foot_compensation.cpp index 09ad33f418..a0f15e1dc1 100644 --- a/tests/libslic3r/test_elephant_foot_compensation.cpp +++ b/tests/libslic3r/test_elephant_foot_compensation.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/libslic3r/test_emboss.cpp b/tests/libslic3r/test_emboss.cpp index 40f448f732..cdac9b3d73 100644 --- a/tests/libslic3r/test_emboss.cpp +++ b/tests/libslic3r/test_emboss.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include // only debug visualization @@ -414,7 +414,7 @@ TEST_CASE("ray segment intersection", "[MeshBoolean]") CHECK(abs(*t1 - *t2) < std::numeric_limits::epsilon()); } -TEST_CASE("triangle intersection", "[]") +TEST_CASE("triangle intersection", "[its]") { Vec2d point(1, 1); Vec2d dir(-1, 0); @@ -483,7 +483,7 @@ TEST_CASE("Italic check", "[Emboss]") #endif // FONT_DIR_PATH #include "libslic3r/CutSurface.hpp" -TEST_CASE("Cut surface", "[]") +TEST_CASE("Cut surface", "[its]") { std::string font_path = get_font_filepath(); char letter = '%'; diff --git a/tests/libslic3r/test_expolygon.cpp b/tests/libslic3r/test_expolygon.cpp index ca914d35ec..aba67cad06 100644 --- a/tests/libslic3r/test_expolygon.cpp +++ b/tests/libslic3r/test_expolygon.cpp @@ -1,10 +1,12 @@ -#include +#include +#include #include "libslic3r/Point.hpp" #include "libslic3r/Polygon.hpp" #include "libslic3r/ExPolygon.hpp" using namespace Slic3r; +using namespace Catch; static inline bool points_close(const Point &p1, const Point &p2) { diff --git a/tests/libslic3r/test_geometry.cpp b/tests/libslic3r/test_geometry.cpp index 553f19c9d5..8c17e9e12d 100644 --- a/tests/libslic3r/test_geometry.cpp +++ b/tests/libslic3r/test_geometry.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Point.hpp" #include "libslic3r/BoundingBox.hpp" diff --git a/tests/libslic3r/test_hollowing.cpp b/tests/libslic3r/test_hollowing.cpp index ad4f8f2961..1e8130f9e0 100644 --- a/tests/libslic3r/test_hollowing.cpp +++ b/tests/libslic3r/test_hollowing.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "libslic3r/SLA/Hollowing.hpp" diff --git a/tests/libslic3r/test_indexed_triangle_set.cpp b/tests/libslic3r/test_indexed_triangle_set.cpp index b6aad9dcf4..1a8634dd31 100644 --- a/tests/libslic3r/test_indexed_triangle_set.cpp +++ b/tests/libslic3r/test_indexed_triangle_set.cpp @@ -1,6 +1,7 @@ #include #include -#include +#include +#include #include "libslic3r/TriangleMesh.hpp" diff --git a/tests/libslic3r/test_jump_point_search.cpp b/tests/libslic3r/test_jump_point_search.cpp index 76d2aac980..d71acea647 100644 --- a/tests/libslic3r/test_jump_point_search.cpp +++ b/tests/libslic3r/test_jump_point_search.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/BoundingBox.hpp" #include "libslic3r/JumpPointSearch.hpp" diff --git a/tests/libslic3r/test_kdtreeindirect.cpp b/tests/libslic3r/test_kdtreeindirect.cpp index bc6ace7954..792ecf5e8a 100644 --- a/tests/libslic3r/test_kdtreeindirect.cpp +++ b/tests/libslic3r/test_kdtreeindirect.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/KDTreeIndirect.hpp" #include "libslic3r/Execution/ExecutionSeq.hpp" diff --git a/tests/libslic3r/test_layer_region.cpp b/tests/libslic3r/test_layer_region.cpp index 1351b8a6e4..3fe849d9ba 100644 --- a/tests/libslic3r/test_layer_region.cpp +++ b/tests/libslic3r/test_layer_region.cpp @@ -2,11 +2,13 @@ #include "libslic3r/Geometry.hpp" #include "libslic3r/Point.hpp" #include "libslic3r/SVG.hpp" -#include +#include +#include #include using namespace Slic3r; using namespace Slic3r::Algorithm; +using namespace Catch; constexpr bool export_svgs = false; diff --git a/tests/libslic3r/test_line.cpp b/tests/libslic3r/test_line.cpp index 4a8edf224f..ccb9b7179d 100644 --- a/tests/libslic3r/test_line.cpp +++ b/tests/libslic3r/test_line.cpp @@ -2,7 +2,9 @@ * Ported from xs/t/10_line.t */ -#include +#include +#include + #include #include "test_utils.hpp" @@ -37,7 +39,7 @@ TEST_CASE("Parallel lines under angles", "[Line]") { CHECK(line.parallel_to(line.direction())); INFO("Line is parallel to its direction + PI"); line.parallel_to(line.direction() + M_PI); - INFO("line is parallel to its direction - PI") + INFO("line is parallel to its direction - PI"); line.parallel_to(line.direction() - M_PI); SECTION("Line is parallel within epsilon") { diff --git a/tests/libslic3r/test_marchingsquares.cpp b/tests/libslic3r/test_marchingsquares.cpp index 89a86f1eeb..c060f0c282 100644 --- a/tests/libslic3r/test_marchingsquares.cpp +++ b/tests/libslic3r/test_marchingsquares.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/libslic3r/test_meshboolean.cpp b/tests/libslic3r/test_meshboolean.cpp index 7587677519..8b1e2a2b1e 100644 --- a/tests/libslic3r/test_meshboolean.cpp +++ b/tests/libslic3r/test_meshboolean.cpp @@ -1,10 +1,12 @@ -#include +#include +#include #include #include #include using namespace Slic3r; +using namespace Catch; TEST_CASE("CGAL and TriangleMesh conversions", "[MeshBoolean]") { TriangleMesh sphere = make_sphere(1.); diff --git a/tests/libslic3r/test_multiple_beds.cpp b/tests/libslic3r/test_multiple_beds.cpp index 10640a4c3d..f0098cae8d 100644 --- a/tests/libslic3r/test_multiple_beds.cpp +++ b/tests/libslic3r/test_multiple_beds.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/libslic3r/test_mutable_polygon.cpp b/tests/libslic3r/test_mutable_polygon.cpp index 5a3c144410..6cb074891d 100644 --- a/tests/libslic3r/test_mutable_polygon.cpp +++ b/tests/libslic3r/test_mutable_polygon.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Point.hpp" #include "libslic3r/MutablePolygon.hpp" diff --git a/tests/libslic3r/test_mutable_priority_queue.cpp b/tests/libslic3r/test_mutable_priority_queue.cpp index 7e31b57c7c..3d026bd41a 100644 --- a/tests/libslic3r/test_mutable_priority_queue.cpp +++ b/tests/libslic3r/test_mutable_priority_queue.cpp @@ -1,6 +1,7 @@ -#include +#include #include +#include #include "libslic3r/MutablePriorityQueue.hpp" diff --git a/tests/libslic3r/test_optimizers.cpp b/tests/libslic3r/test_optimizers.cpp index 6e84f6a691..533ac78b9c 100644 --- a/tests/libslic3r/test_optimizers.cpp +++ b/tests/libslic3r/test_optimizers.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/libslic3r/test_placeholder_parser.cpp b/tests/libslic3r/test_placeholder_parser.cpp index 9a1405f021..664d7038f9 100644 --- a/tests/libslic3r/test_placeholder_parser.cpp +++ b/tests/libslic3r/test_placeholder_parser.cpp @@ -1,9 +1,11 @@ -#include +#include +#include #include "libslic3r/PlaceholderParser.hpp" #include "libslic3r/PrintConfig.hpp" using namespace Slic3r; +using namespace Catch; SCENARIO("Placeholder parser scripting", "[PlaceholderParser]") { PlaceholderParser parser; diff --git a/tests/libslic3r/test_png_io.cpp b/tests/libslic3r/test_png_io.cpp index 97fa064254..f5e0ae7f00 100644 --- a/tests/libslic3r/test_png_io.cpp +++ b/tests/libslic3r/test_png_io.cpp @@ -2,7 +2,7 @@ #define NOMINMAX #endif -#include +#include #include diff --git a/tests/libslic3r/test_point.cpp b/tests/libslic3r/test_point.cpp index 156995f078..8f453a92b6 100644 --- a/tests/libslic3r/test_point.cpp +++ b/tests/libslic3r/test_point.cpp @@ -5,11 +5,13 @@ * and cross product uses doubles */ -#include +#include +#include #include #include "test_utils.hpp" using namespace Slic3r; +using namespace Catch; TEST_CASE("Nearest point", "[Point]") { const Point point{10, 15}; diff --git a/tests/libslic3r/test_polygon.cpp b/tests/libslic3r/test_polygon.cpp index b2608883cb..d80ef885e7 100644 --- a/tests/libslic3r/test_polygon.cpp +++ b/tests/libslic3r/test_polygon.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Point.hpp" #include "libslic3r/Polygon.hpp" diff --git a/tests/libslic3r/test_polyline.cpp b/tests/libslic3r/test_polyline.cpp index d519741bf4..114907e7e9 100644 --- a/tests/libslic3r/test_polyline.cpp +++ b/tests/libslic3r/test_polyline.cpp @@ -1,7 +1,7 @@ /** * Ported from xs/t/09_polyline.t */ -#include +#include #include "libslic3r/Point.hpp" #include "libslic3r/Polyline.hpp" diff --git a/tests/libslic3r/test_quadric_edge_collapse.cpp b/tests/libslic3r/test_quadric_edge_collapse.cpp index 107cc9deb0..ea1e4f4baa 100644 --- a/tests/libslic3r/test_quadric_edge_collapse.cpp +++ b/tests/libslic3r/test_quadric_edge_collapse.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -240,7 +240,7 @@ TEST_CASE("Simplify frog_legs.obj to 5% by Quadric edge collapse", "[its][quadri Private::is_better_similarity(mesh.its, its, Private::frog_leg_5); } -TEST_CASE("Simplify frog_legs.obj to 5% by IGL/qslim", "[]") +TEST_CASE("Simplify frog_legs.obj to 5% by IGL/qslim", "[its]") { std::string obj_filename = "frog_legs.obj"; TriangleMesh mesh = load_model(obj_filename); diff --git a/tests/libslic3r/test_region_expansion.cpp b/tests/libslic3r/test_region_expansion.cpp index 9f8a6fdc5f..4da6c19ce6 100644 --- a/tests/libslic3r/test_region_expansion.cpp +++ b/tests/libslic3r/test_region_expansion.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -8,6 +9,7 @@ #include using namespace Slic3r; +using namespace Catch; //#define DEBUG_TEMP_DIR "d:\\temp\\" diff --git a/tests/libslic3r/test_static_map.cpp b/tests/libslic3r/test_static_map.cpp index 6722a30bfe..ffee84f0fc 100644 --- a/tests/libslic3r/test_static_map.cpp +++ b/tests/libslic3r/test_static_map.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "libslic3r/StaticMap.hpp" diff --git a/tests/libslic3r/test_stl.cpp b/tests/libslic3r/test_stl.cpp index 4c9c1bcbb6..0e57a79eb0 100644 --- a/tests/libslic3r/test_stl.cpp +++ b/tests/libslic3r/test_stl.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Model.hpp" #include "libslic3r/Format/STL.hpp" diff --git a/tests/libslic3r/test_support_spots_generator.cpp b/tests/libslic3r/test_support_spots_generator.cpp index 7b8dd77bae..3c348b54c8 100644 --- a/tests/libslic3r/test_support_spots_generator.cpp +++ b/tests/libslic3r/test_support_spots_generator.cpp @@ -1,9 +1,12 @@ #include "libslic3r/Point.hpp" -#include +#include +#include +#include #include using namespace Slic3r; using namespace SupportSpotsGenerator; +using namespace Catch; namespace Rectangle { const float width = 10; diff --git a/tests/libslic3r/test_surface_mesh.cpp b/tests/libslic3r/test_surface_mesh.cpp index 34ff356679..b9d3635974 100644 --- a/tests/libslic3r/test_surface_mesh.cpp +++ b/tests/libslic3r/test_surface_mesh.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/tests/libslic3r/test_timeutils.cpp b/tests/libslic3r/test_timeutils.cpp index 6630d7055b..8cd3a5b86b 100644 --- a/tests/libslic3r/test_timeutils.cpp +++ b/tests/libslic3r/test_timeutils.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Time.hpp" diff --git a/tests/libslic3r/test_triangulation.cpp b/tests/libslic3r/test_triangulation.cpp index 5a1f99fa97..1341e1384e 100644 --- a/tests/libslic3r/test_triangulation.cpp +++ b/tests/libslic3r/test_triangulation.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include // only debug visualization diff --git a/tests/libslic3r/test_utils.cpp b/tests/libslic3r/test_utils.cpp index 74d4094969..2f696cf1ee 100644 --- a/tests/libslic3r/test_utils.cpp +++ b/tests/libslic3r/test_utils.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/libslic3r.h" diff --git a/tests/libslic3r/test_voronoi.cpp b/tests/libslic3r/test_voronoi.cpp index f415dc74c0..1caaf7e955 100644 --- a/tests/libslic3r/test_voronoi.cpp +++ b/tests/libslic3r/test_voronoi.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -6,6 +6,7 @@ #include #include +#include //#define VORONOI_DEBUG_OUT diff --git a/tests/sla_print/sla_archive_readwrite_tests.cpp b/tests/sla_print/sla_archive_readwrite_tests.cpp index 3c1dc835fd..405877d659 100644 --- a/tests/sla_print/sla_archive_readwrite_tests.cpp +++ b/tests/sla_print/sla_archive_readwrite_tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "libslic3r/SLAPrint.hpp" diff --git a/tests/sla_print/sla_raycast_tests.cpp b/tests/sla_print/sla_raycast_tests.cpp index 1f2962bec4..28022276c6 100644 --- a/tests/sla_print/sla_raycast_tests.cpp +++ b/tests/sla_print/sla_raycast_tests.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -7,6 +8,7 @@ #include "sla_test_utils.hpp" using namespace Slic3r; +using namespace Catch; // First do a simple test of the hole raycaster. TEST_CASE("Raycaster - find intersections of a line and cylinder") diff --git a/tests/sla_print/sla_supptgen_tests.cpp b/tests/sla_print/sla_supptgen_tests.cpp index e5e6024386..226c9cedad 100644 --- a/tests/sla_print/sla_supptgen_tests.cpp +++ b/tests/sla_print/sla_supptgen_tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/sla_print/sla_supptreeutils_tests.cpp b/tests/sla_print/sla_supptreeutils_tests.cpp index c8abbb8315..d7332ef223 100644 --- a/tests/sla_print/sla_supptreeutils_tests.cpp +++ b/tests/sla_print/sla_supptreeutils_tests.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -7,6 +8,8 @@ #include "libslic3r/SLA/SupportTreeUtils.hpp" #include "libslic3r/SLA/SupportTreeUtilsLegacy.hpp" +using Catch::Approx; + // Test pair hash for 'nums' random number pairs. template void test_pairhash() { diff --git a/tests/sla_print/sla_test_utils.hpp b/tests/sla_print/sla_test_utils.hpp index 103b2f66a4..99f4862b48 100644 --- a/tests/sla_print/sla_test_utils.hpp +++ b/tests/sla_print/sla_test_utils.hpp @@ -1,7 +1,8 @@ #ifndef SLA_TEST_UTILS_HPP #define SLA_TEST_UTILS_HPP -#include +#include +#include #include // Debug @@ -22,6 +23,7 @@ #include "libslic3r/SVG.hpp" using namespace Slic3r; +using Catch::Approx; enum e_validity { ASSUME_NO_EMPTY = 1, diff --git a/tests/sla_print/sla_zcorrection_tests.cpp b/tests/sla_print/sla_zcorrection_tests.cpp index 69734c253b..cd5063f524 100644 --- a/tests/sla_print/sla_zcorrection_tests.cpp +++ b/tests/sla_print/sla_zcorrection_tests.cpp @@ -1,4 +1,6 @@ -#include +#include +#include +#include #include #include @@ -8,6 +10,8 @@ #include "libslic3r/MTUtils.hpp" #include "libslic3r/SVG.hpp" +using Catch::Approx; + void print_depthmap(std::string_view prefix, const Slic3r::BoundingBox &bb, const Slic3r::sla::zcorr_detail::DepthMap &dm) diff --git a/tests/slic3rutils/secretstore_tests.cpp b/tests/slic3rutils/secretstore_tests.cpp index 185ddb8069..1219175d17 100644 --- a/tests/slic3rutils/secretstore_tests.cpp +++ b/tests/slic3rutils/secretstore_tests.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include "catch2/catch_test_macros.hpp" #include "slic3r/Utils/Secrets.hpp" diff --git a/tests/slic3rutils/slic3r_arrangejob_tests.cpp b/tests/slic3rutils/slic3r_arrangejob_tests.cpp index ee492ff2cb..c569d7576a 100644 --- a/tests/slic3rutils/slic3r_arrangejob_tests.cpp +++ b/tests/slic3rutils/slic3r_arrangejob_tests.cpp @@ -1,4 +1,6 @@ -#include "catch2/catch.hpp" +#include +#include +#include #include "test_utils.hpp" #include @@ -14,6 +16,8 @@ #include "libslic3r/Format/3mf.hpp" +using Catch::Approx; + class RandomArrangeSettings: public Slic3r::arr2::ArrangeSettingsView { Slic3r::arr2::ArrangeSettingsDb::Values m_v; diff --git a/tests/slic3rutils/slic3r_jobs_tests.cpp b/tests/slic3rutils/slic3r_jobs_tests.cpp index abb8b15265..b4328e3ef3 100644 --- a/tests/slic3rutils/slic3r_jobs_tests.cpp +++ b/tests/slic3rutils/slic3r_jobs_tests.cpp @@ -1,4 +1,5 @@ -#include "catch2/catch.hpp" +#include +#include > #include #include diff --git a/tests/slic3rutils/slic3r_version_tests.cpp b/tests/slic3rutils/slic3r_version_tests.cpp index 14f4f5dc0f..1b20f83d10 100644 --- a/tests/slic3rutils/slic3r_version_tests.cpp +++ b/tests/slic3rutils/slic3r_version_tests.cpp @@ -1,4 +1,4 @@ -#include "catch2/catch.hpp" +#include #include "slic3r/Config/Version.hpp" diff --git a/tests/thumbnails/test_thumbnails_ini_string.cpp b/tests/thumbnails/test_thumbnails_ini_string.cpp index 32ec5cbd13..1ab4964ed0 100644 --- a/tests/thumbnails/test_thumbnails_ini_string.cpp +++ b/tests/thumbnails/test_thumbnails_ini_string.cpp @@ -1,4 +1,4 @@ -#include +#include #include "libslic3r/Config.hpp" #include "libslic3r/PrintConfig.hpp" diff --git a/tests/thumbnails/test_thumbnails_input_string.cpp b/tests/thumbnails/test_thumbnails_input_string.cpp index 4c623b2736..b1b4b8b8cf 100644 --- a/tests/thumbnails/test_thumbnails_input_string.cpp +++ b/tests/thumbnails/test_thumbnails_input_string.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include