From e76bd9d8a6a8e4226ae3dd492439d66ab977d006 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 10 Sep 2023 17:58:19 +0200 Subject: test: use anon namespace instead of static functions --- test/const-math.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/const-math.cpp b/test/const-math.cpp index 5c3e7916..114af28f 100644 --- a/test/const-math.cpp +++ b/test/const-math.cpp @@ -13,11 +13,14 @@ # pragma GCC diagnostic ignored "-Wfloat-equal" #endif -using namespace Magnum; +namespace floormat { + using Magnum::Math::Vector; +namespace { + template -static constexpr void test_float2() +constexpr void test_float2() { const vec a{(T)1, (T)2}, b{(T)2, (T)3}; @@ -31,7 +34,7 @@ static constexpr void test_float2() } template -static constexpr void test_int() +constexpr void test_int() { using I = typename ivec::Type; constexpr auto vec = [](auto x, auto y) { return ivec{(I)x, (I)y}; }; @@ -46,7 +49,7 @@ static constexpr void test_int() fm_assert(a.sum() == 8); } -static constexpr bool compile_tests() +constexpr bool compile_tests() { test_float2, float>(); test_float2, double>(); @@ -59,7 +62,7 @@ static constexpr bool compile_tests() return true; } -namespace floormat { +} // namespace void test_app::test_const_math() { -- cgit v1.2.3