[libcxx] r273344 - Guard use of non-standard macros in denorm_min() tests.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 17:50:10 PDT 2016
Author: ericwf
Date: Tue Jun 21 19:50:09 2016
New Revision: 273344
URL: http://llvm.org/viewvc/llvm-project?rev=273344&view=rev
Log:
Guard use of non-standard macros in denorm_min() tests.
Modified:
libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
Modified: libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp?rev=273344&r1=273343&r2=273344&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp Tue Jun 21 19:50:09 2016
@@ -12,6 +12,7 @@
// denorm_min()
#include <limits>
+#include <cfloat>
#include <cassert>
template <class T>
@@ -47,7 +48,17 @@ int main()
test<__int128_t>(0);
test<__uint128_t>(0);
#endif
+#if defined(__FLT_DENORM_MIN__) // guarded because these macros are extensions.
test<float>(__FLT_DENORM_MIN__);
test<double>(__DBL_DENORM_MIN__);
test<long double>(__LDBL_DENORM_MIN__);
+#endif
+#if defined(FLT_TRUE_MIN) // not currently provided on linux.
+ test<float>(FLT_TRUE_MIN);
+ test<double>(DBL_TRUE_MIN);
+ test<long double>(LDBL_TRUE_MIN);
+#endif
+#if !defined(__FLT_DENORM_MIN__) && !defined(FLT_TRUE_MIN)
+#error Test has no expected values for floating point types
+#endif
}
More information about the cfe-commits
mailing list