From e0ee451a1b73f7c8d54d8829fbdc0c43001e736c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 10 Feb 2022 13:44:18 +0100 Subject: [PATCH] Math: XFAIL some packing tests for x86 Android. Well, I can't tell if it's just 32-bit x86 Android, but it definitely works well on my ARM64 device. Also updated the defines to use the consistent CORRADE_TARGET_* macros instead of the platform-specific mess. --- src/Magnum/Math/Test/PackingTest.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Math/Test/PackingTest.cpp b/src/Magnum/Math/Test/PackingTest.cpp index 37181cf9f..b718a0352 100644 --- a/src/Magnum/Math/Test/PackingTest.cpp +++ b/src/Magnum/Math/Test/PackingTest.cpp @@ -177,8 +177,8 @@ void PackingTest::packUnsigned() { CORRADE_COMPARE(Math::pack(0.0l), 0); { - #ifdef _MSC_VER - CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC."); + #if defined(CORRADE_TARGET_MSVC) || (defined(CORRADE_TARGET_ANDROID) && defined(CORRADE_TARGET_32BIT) && defined(CORRADE_TARGET_X86)) + CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC and 32-bit x86 Android."); #endif CORRADE_COMPARE(Math::pack(1.0l), std::numeric_limits::max()); } @@ -215,15 +215,15 @@ void PackingTest::packSigned() { CORRADE_COMPARE(Math::pack(1.0), std::numeric_limits::max()); { - #ifdef _MSC_VER - CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC."); + #if defined(CORRADE_TARGET_MSVC) || (defined(CORRADE_TARGET_ANDROID) && defined(CORRADE_TARGET_32BIT) && defined(CORRADE_TARGET_X86)) + CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC and 32-bit x86 Android."); #endif CORRADE_COMPARE(Math::pack(-1.0l), std::numeric_limits::min()+1); } CORRADE_COMPARE(Math::pack(0.0l), 0); { - #ifdef _MSC_VER - CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC."); + #if defined(CORRADE_TARGET_MSVC) || (defined(CORRADE_TARGET_ANDROID) && defined(CORRADE_TARGET_32BIT) && defined(CORRADE_TARGET_X86)) + CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC and 32-bit x86 Android."); #endif CORRADE_COMPARE(Math::pack(1.0l), std::numeric_limits::max()); } @@ -256,8 +256,8 @@ void PackingTest::reunpackUnsigned() { CORRADE_COMPARE(Math::unpack(Math::pack(0.0l)), 0.0l); { - #ifdef _MSC_VER - CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC."); + #if defined(CORRADE_TARGET_MSVC) || (defined(CORRADE_TARGET_ANDROID) && defined(CORRADE_TARGET_32BIT) && defined(CORRADE_TARGET_X86)) + CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC and 32-bit x86 Android."); #endif CORRADE_COMPARE(Math::unpack(Math::pack(1.0l)), 1.0l); } @@ -279,7 +279,7 @@ void PackingTest::reunpackSigned() { CORRADE_COMPARE(Math::unpack(Math::pack(-1.0l)), -1.0l); CORRADE_COMPARE(Math::unpack(Math::pack(0.0l)), 0.0l); { - #if defined(_MSC_VER) || (defined(CORRADE_TARGET_ANDROID) && !__LP64__) + #if defined(CORRADE_TARGET_MSVC) || (defined(CORRADE_TARGET_ANDROID) && defined(CORRADE_TARGET_32BIT)) CORRADE_EXPECT_FAIL("Long double (de)normalization is broken on MSVC and 32-bit Android."); #endif CORRADE_COMPARE(Math::unpack(Math::pack(1.0l)), 1.0l);