summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-10 17:58:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-10 23:11:29 +0200
commite76bd9d8a6a8e4226ae3dd492439d66ab977d006 (patch)
treedbe658fb899852e137635d60da16d68c2f762a74
parent4e2b7d27041dd98fab836c5a3c2c45322ed898e2 (diff)
test: use anon namespace instead of static functions
-rw-r--r--test/const-math.cpp13
1 files 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<typename vec, typename T>
-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<typename ivec>
-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<Vector<2, float>, float>();
test_float2<Vector<2, double>, double>();
@@ -59,7 +62,7 @@ static constexpr bool compile_tests()
return true;
}
-namespace floormat {
+} // namespace
void test_app::test_const_math()
{