Skip to content
Snippets Groups Projects
Commit 56dc21f7 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

sort fcts

parent 4b86005c
No related branches found
No related tags found
1 merge request!1185MultiQTest: detailed report for worst case only
...@@ -7,9 +7,15 @@ ...@@ -7,9 +7,15 @@
//! Check that form factors are invariant when q is transformed according to particle symmetry. //! Check that form factors are invariant when q is transformed according to particle symmetry.
class FFSymmetryTest : public testing::Test { class FFSymmetryTest : public testing::Test {
private: protected:
using transform_t = std::function<C3(const C3&)>; void run_test(IFormFactor* ff, std::function<C3(const C3&)> trafo,
double eps, double qmag1, double qmag2)
{
formfactorTest::run_test_for_many_q([&](C3 q) { test_qq_eq(ff, q, trafo(q), eps); }, qmag1,
qmag2);
}
private:
void test_qq_eq(IFormFactor* ff, C3 q, C3 p, double eps) void test_qq_eq(IFormFactor* ff, C3 q, C3 p, double eps)
{ {
complex_t f0 = ff->formfactor(q); complex_t f0 = ff->formfactor(q);
...@@ -34,13 +40,6 @@ private: ...@@ -34,13 +40,6 @@ private:
#endif #endif
; ;
} }
protected:
void run_test(IFormFactor* ff, transform_t trafo, double eps, double qmag1, double qmag2)
{
formfactorTest::run_test_for_many_q([&](C3 q) { test_qq_eq(ff, q, trafo(q), eps); }, qmag1,
qmag2);
}
}; };
//*********** polyhedra *************** //*********** polyhedra ***************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment