From e6567af3641c790da679d5f1bc80c17c2d120a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 7 Nov 2015 20:15:33 +0100 Subject: [PATCH] Math: don't depend on char signedness in test. Hopefully that was only in the test. --- src/Magnum/Math/Test/FunctionsTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Math/Test/FunctionsTest.cpp b/src/Magnum/Math/Test/FunctionsTest.cpp index f751e3a86..95275e652 100644 --- a/src/Magnum/Math/Test/FunctionsTest.cpp +++ b/src/Magnum/Math/Test/FunctionsTest.cpp @@ -414,7 +414,13 @@ void FunctionsTest::renormalizeSinged() { } void FunctionsTest::normalizeTypeDeduction() { - CORRADE_COMPARE(Math::normalize('\x7F'), 1.0f); + if(std::is_signed::value) + CORRADE_COMPARE(Math::normalize('\x7F'), 1.0f); + else { + /* Raspberry Pi `char` is unsigned (huh) */ + CORRADE_VERIFY(std::is_unsigned::value); + CORRADE_COMPARE(Math::normalize('\x7F'), 0.498039f); + } CORRADE_COMPARE((Math::normalize('\x7F')), 1.0f); }