diff --git a/tests/common/testUtils.h b/tests/common/testUtils.h index 9c94a422d..9294b6c1a 100644 --- a/tests/common/testUtils.h +++ b/tests/common/testUtils.h @@ -341,3 +341,12 @@ typename DataPoint::Scalar getKappaMean(const std::vector& _vectorPoi return kappaMean / nbNei; } + +// compile-time and run-time check if a given value is true or false +// this template function is required because "Outside a template, a discarded +// statement is fully checked." (cppreference.com/w/cpp/language/if) +template +void CHECK() { + static_assert(b); + VERIFY(b); +} \ No newline at end of file diff --git a/tests/src/capability.cpp b/tests/src/capability.cpp index 97a8fda99..da8971d54 100644 --- a/tests/src/capability.cpp +++ b/tests/src/capability.cpp @@ -27,15 +27,6 @@ using DataPoint = PointPosition; using Kernel = ConstantWeightKernel; using WeightFunc = DistWeightFunc; -// compile-time and run-time check if a given value is true or false -// this template function is required because "Outside a template, a discarded -// statement is fully checked." (cppreference.com/w/cpp/language/if) -template -void CHECK() { - static_assert(b); - VERIFY(b); -} - // extension that test if PLANE is provided template class InitTestExtensionPlane : public T