lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 0d09e74 05/16: Make a macro definition condit


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0d09e74 05/16: Make a macro definition conditional
Date: Thu, 15 Nov 2018 17:37:03 -0500 (EST)

branch: master
commit 0d09e749ccd77beb3fe3d0c73ddc9b482b143fc9
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Make a macro definition conditional
---
 fenv_lmi_test.cpp | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/fenv_lmi_test.cpp b/fenv_lmi_test.cpp
index dc6a472..386466f 100644
--- a/fenv_lmi_test.cpp
+++ b/fenv_lmi_test.cpp
@@ -50,17 +50,20 @@ std::bitset<CHAR_BIT * sizeof(std::uint32_t)> 
bits(std::uint32_t i)
     return std::bitset<CHAR_BIT * sizeof(std::uint32_t)>(i);
 }
 
-#define BOOST_TEST_EQUAL_BITS(a,b)                    \
-    if((a) == (b))                                    \
-        lmi_test::record_success();                   \
-    else                                              \
-        {                                             \
-        lmi_test::record_error();                     \
-        lmi_test::error_stream() << "Unequal:";       \
-        lmi_test::error_stream() << bits(a);          \
-        lmi_test::error_stream() << bits(b);          \
-        lmi_test::error_stream() << BOOST_TEST_FLUSH; \
-        }                                             \
+#if defined LMI_X87
+#   define BOOST_TEST_EQUAL_BITS(a,b)                     \
+        if((a) == (b))                                    \
+            lmi_test::record_success();                   \
+        else                                              \
+            {                                             \
+            lmi_test::record_error();                     \
+            lmi_test::error_stream() << "Unequal:";       \
+            lmi_test::error_stream() << bits(a);          \
+            lmi_test::error_stream() << bits(b);          \
+            lmi_test::error_stream() << BOOST_TEST_FLUSH; \
+            }                                             \
+
+#endif // defined LMI_X87
 
 int test_main(int, char*[])
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]