summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schauer Marin Rodrigues <josch@debian.org>2022-09-12 09:24:20 +0200
committerJohannes Schauer Marin Rodrigues <josch@debian.org>2022-09-12 09:27:19 +0200
commit19ab8af70935897da8e239ee4b592a37f5a997ee (patch)
treeb795e8a93ca952168e8a03d9b0d7d3d540cc36f2
parent7ebefda21bb722248d490776a678f7c1659d8c1d (diff)
add patch to replace Catch with Catch2
Closes: #1017155
-rw-r--r--debian/control2
-rw-r--r--debian/patches/fix-tests2.patch181
-rw-r--r--debian/patches/series1
3 files changed, 183 insertions, 1 deletions
diff --git a/debian/control b/debian/control
index 9cab77f..c15f78a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Johannes Schauer Marin Rodrigues <josch@debian.org>
Standards-Version: 4.5.0
Homepage: http://www.fuzzylite.com/cpp/
-Build-Depends: debhelper-compat (= 13), cmake
+Build-Depends: debhelper-compat (= 13), cmake, catch2
Vcs-Browser: https://salsa.debian.org/debian/fuzzylite
Vcs-Git: https://salsa.debian.org/debian/fuzzylite.git
Rules-Requires-Root: no
diff --git a/debian/patches/fix-tests2.patch b/debian/patches/fix-tests2.patch
new file mode 100644
index 0000000..19160f7
--- /dev/null
+++ b/debian/patches/fix-tests2.patch
@@ -0,0 +1,181 @@
+From: Ferdinand Thiessen <f.thiessen@gmx.de>
+Date: Mon, 12 Sep 2022 07:18:39 GMT
+Subject: Replace Catch with Catch2 and require C++11 for tests
+
+--- a/fuzzylite/CMakeLists.txt
++++ b/fuzzylite/CMakeLists.txt
+@@ -194,7 +194,9 @@ if(FL_BUILD_BINARY)
+ endif(FL_BUILD_BINARY)
+
+ if(FL_BUILD_TESTS)
++ find_package(Catch2)
+ add_executable(fl-test ${fl-headers} ${fl-tests})
++ target_link_libraries(fl-test Catch2::Catch2)
+ set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests)
+ set_target_properties(fl-test PROPERTIES OUTPUT_NAME fuzzylite-tests IMPORT_PREFIX tmp-) #To prevent LNK1149 in Windows
+ set_target_properties(fl-test PROPERTIES DEBUG_POSTFIX -debug)
+--- a/fuzzylite/test/activation/ThresholdTest.cpp
++++ b/fuzzylite/test/activation/ThresholdTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/BenchmarkTest.cpp
++++ b/fuzzylite/test/BenchmarkTest.cpp
+@@ -16,7 +16,7 @@
+
+ #include "fl/Benchmark.h"
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ #include <vector>
+--- a/fuzzylite/test/hedge/HedgeFunctionTest.cpp
++++ b/fuzzylite/test/hedge/HedgeFunctionTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/imex/FldExporterTest.cpp
++++ b/fuzzylite/test/imex/FldExporterTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/imex/FllImporterTest.cpp
++++ b/fuzzylite/test/imex/FllImporterTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/imex/RScriptExporterTest.cpp
++++ b/fuzzylite/test/imex/RScriptExporterTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+ #include <fstream>
+
+--- a/fuzzylite/test/MainTest.cpp
++++ b/fuzzylite/test/MainTest.cpp
+@@ -16,7 +16,7 @@
+
+ #define CATCH_CONFIG_RUNNER
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+
+ #include "fl/Headers.h"
+
+--- a/fuzzylite/test/norm/NormFunctionTest.cpp
++++ b/fuzzylite/test/norm/NormFunctionTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/QuickTest.cpp
++++ b/fuzzylite/test/QuickTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/term/AggregatedTest.cpp
++++ b/fuzzylite/test/term/AggregatedTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/term/DiscreteTest.cpp
++++ b/fuzzylite/test/term/DiscreteTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/term/FunctionTest.cpp
++++ b/fuzzylite/test/term/FunctionTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/term/TrapezoidTest.cpp
++++ b/fuzzylite/test/term/TrapezoidTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/term/TriangleTest.cpp
++++ b/fuzzylite/test/term/TriangleTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ namespace fl {
+--- a/fuzzylite/test/variable/VariableTest.cpp
++++ b/fuzzylite/test/variable/VariableTest.cpp
+@@ -14,7 +14,7 @@
+ fuzzylite is a registered trademark of FuzzyLite Limited.
+ */
+
+-#include "test/catch.hpp"
++#include "catch2/catch.hpp"
+ #include "fl/Headers.h"
+
+ #include <algorithm> // std::random_shuffle
diff --git a/debian/patches/series b/debian/patches/series
index d8925b1..7a28790 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
reproducible.patch
fix-tests.patch
+fix-tests2.patch
when-testing-large-float-numbers-for-equ.patch
0001-fuzzylite-src-main.cpp-support-building-with-gcc-12.patch