From 01c62a9d91f77d7636bd8ede0a800f0a39d8a816 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sun, 11 Dec 2022 19:30:30 +0100
Subject: [PATCH] rm unused test2

---
 Tests/Unit/Numeric/MultiQTest.cpp | 36 -------------------------------
 Tests/Unit/Numeric/MultiQTest.h   |  6 ++----
 2 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/Tests/Unit/Numeric/MultiQTest.cpp b/Tests/Unit/Numeric/MultiQTest.cpp
index 05c0a411a15..c173cd7df57 100644
--- a/Tests/Unit/Numeric/MultiQTest.cpp
+++ b/Tests/Unit/Numeric/MultiQTest.cpp
@@ -39,42 +39,6 @@ void run_test_for_many_q(std::function<void(C3)> run_one_test, double qmag_min,
     }
 }
 
-int run_test2_for_many_q(std::function<double(C3, bool)> run_one_test, double qmag_min,
-                         double qmag_max, double eps, bool real_only)
-{
-    ParamGenerator<std::tuple<C3, C3, double, double, double>> gen = qlist;
-    double max_deviation = 0;
-    C3 q_at_max;
-    int failures = 0;
-    for (auto it : gen) {
-        const C3 q_maindir = std::get<0>(it);
-        const C3 q_sidedir = std::get<1>(it);
-        const double qrealmag = std::get<2>(it);
-        const double qsidemag = std::get<3>(it);
-        const double qimagrel = std::get<4>(it);
-        if (real_only && qimagrel)
-            continue;
-        const complex_t qmag(qrealmag, qrealmag * qimagrel);
-        if (std::abs(qmag) <= qmag_min || std::abs(qmag) >= qmag_max)
-            continue;
-        if (q_maindir == q_sidedir)
-            continue;
-        const C3 q = qmag * (q_maindir + qsidemag * q_sidedir).unit();
-
-        double deviation = run_one_test(q, false); // callback passed as argument
-        if (deviation > eps) {
-            ++failures;
-            if (deviation > max_deviation) {
-                max_deviation = deviation;
-                q_at_max = q;
-            }
-        }
-    }
-    if (failures)
-        run_one_test(q_at_max, true); // report worst case
-    return failures;
-}
-
 int run_test3_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
                          double qmag_min, double qmag_max, double eps, bool real_only)
 {
diff --git a/Tests/Unit/Numeric/MultiQTest.h b/Tests/Unit/Numeric/MultiQTest.h
index d22a3e24f72..a05fa74e668 100644
--- a/Tests/Unit/Numeric/MultiQTest.h
+++ b/Tests/Unit/Numeric/MultiQTest.h
@@ -14,10 +14,8 @@ namespace formfactorTest {
 void run_test_for_many_q(std::function<void(C3)> run_one_test, double qmag_min, double qmag_max,
                          bool real_only = false);
 
-//! Runs callback function "run_one_test(q)" for a huge number of different vectors q.
-int run_test2_for_many_q(std::function<double(C3, bool)> run_one_test, double qmag_min,
-                         double qmag_max, double eps, bool real_only = false);
-
+//! Runs tests of fff0(q) vs fff1(q) for a huge number of different vectors q.
+//! The callback functions fff0/1 may compute ff0(q) vs ff1(q), or ff(q) vs ff(q').
 int run_test3_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
                          double qmag_min, double qmag_max, double eps, bool real_only = false);
 
-- 
GitLab