|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79741 - trunk/libs/math/test
From: pbristow_at_[hidden]
Date: 2012-07-25 09:35:28
Author: pbristow
Date: 2012-07-25 09:35:27 EDT (Wed, 25 Jul 2012)
New Revision: 79741
URL: http://svn.boost.org/trac/boost/changeset/79741
Log:
Updated tests to use new macro BOOST_NO_CXX11_NUMERIC_LIMITS
Text files modified:
trunk/libs/math/test/ztest_max_digits10.cpp | 7 ++++---
trunk/libs/math/test/zztest_max_digits10.cpp | 16 +++++++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
Modified: trunk/libs/math/test/ztest_max_digits10.cpp
==============================================================================
--- trunk/libs/math/test/ztest_max_digits10.cpp (original)
+++ trunk/libs/math/test/ztest_max_digits10.cpp 2012-07-25 09:35:27 EDT (Wed, 25 Jul 2012)
@@ -16,7 +16,8 @@
This is needed to produce or select a macro to avoid compilation failure in Boost.Test
for platforms that do not include either or both of these.
-BOOST_NO_NUMERIC_LIMITS_LOWEST may be suitable?
+BOOST_NO_NUMERIC_LIMITS_LOWEST is suitable but deprecated.
+
[Boost C++ Libraries]
@@ -42,9 +43,9 @@
int digits10 = std::numeric_limits<double>::digits10;
int max_digits10 = std::numeric_limits<double>::max_digits10;
- std::cout << "std::numeric_limits<double>::digits10 = " << std::numeric_limits<double>::digits10 << std::endl;
+ std::cout << "std::numeric_limits<double>::digits10 = " << digits10 << std::endl;
- std::cout << "std::numeric_limits<double>::max_digits10 = " << std::numeric_limits<double>::max_digits10 << std::endl;
+ std::cout << "std::numeric_limits<double>::max_digits10 = " << max_digits10 << std::endl;
} // int main()
Modified: trunk/libs/math/test/zztest_max_digits10.cpp
==============================================================================
--- trunk/libs/math/test/zztest_max_digits10.cpp (original)
+++ trunk/libs/math/test/zztest_max_digits10.cpp 2012-07-25 09:35:27 EDT (Wed, 25 Jul 2012)
@@ -1,5 +1,5 @@
- // Copyright 2010 Paul A. Bristow
+// Copyright 2010 Paul A. Bristow
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -16,7 +16,11 @@
This is needed to produce or select a macro to avoid compilation failure in Boost.Test
for platforms that do not include either or both of these.
-BOOST_NO_NUMERIC_LIMITS_LOWEST may be suitable and is tested here.
+BOOST_NO_NUMERIC_LIMITS_LOWEST is suitable but is deprecated in favour of
+
+BOOST_NO_CXX11_NUMERIC_LIMITS
+
+and is tested here.
[Boost C++ Libraries]
@@ -40,11 +44,13 @@
<< BOOST_VERSION % 100 << std::endl;
int digits10 = std::numeric_limits<double>::digits10;
- std::cout << "std::numeric_limits<double>::digits10 = " << std::numeric_limits<double>::digits10 << std::endl;
+ std::cout << "std::numeric_limits<double>::digits10 = " << digits10 << std::endl;
+
+//#ifndef BOOST_NO_NUMERIC_LIMITS_LOWEST
-#ifndef BOOST_NO_NUMERIC_LIMITS_LOWEST
+#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
int max_digits10 = std::numeric_limits<double>::max_digits10;
- std::cout << "std::numeric_limits<double>::max_digits10 = " << std::numeric_limits<double>::max_digits10 << std::endl;
+ std::cout << "std::numeric_limits<double>::max_digits10 = " << max_digits10 << std::endl;
#endif
} // int main()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk