33 lines
927 B
Diff
33 lines
927 B
Diff
--- a/tests/CMakeLists.txt
|
|
+++ b/tests/CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-require_package(Catch2 2.9.1 REQUIRED NO_EXPORT)
|
|
+require_package(Catch2 "" REQUIRED NO_EXPORT)
|
|
|
|
add_executable(tests_clipper_nlopt
|
|
test.cpp
|
|
@@ -14,5 +14,5 @@ if (MSVC)
|
|
target_compile_options(tests_clipper_nlopt PRIVATE /bigobj)
|
|
endif ()
|
|
|
|
-target_link_libraries(tests_clipper_nlopt libnest2d Catch2::Catch2)
|
|
+target_link_libraries(tests_clipper_nlopt libnest2d Catch2::Catch2WithMain)
|
|
add_test(libnest2d_tests tests_clipper_nlopt)
|
|
--- a/tests/test.cpp
|
|
+++ b/tests/test.cpp
|
|
@@ -1,5 +1,4 @@
|
|
-#define CATCH_CONFIG_MAIN
|
|
-#include <catch2/catch.hpp>
|
|
+#include <catch2/catch_all.hpp>
|
|
|
|
#include <fstream>
|
|
|
|
@@ -29,6 +28,7 @@ template<> struct _NumTag<LargeInt> { us
|
|
template<class T> struct _NumTag<boost::rational<T>> { using Type = RationalTag; };
|
|
|
|
using RectangleItem = libnest2d::Rectangle;
|
|
+using Approx = Catch::Approx;
|
|
|
|
namespace nfp {
|
|
|