|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60522 - branches/units/autoprefix/libs/units/test
From: steven_at_[hidden]
Date: 2010-03-12 11:25:43
Author: steven_watanabe
Date: 2010-03-12 11:25:42 EST (Fri, 12 Mar 2010)
New Revision: 60522
URL: http://svn.boost.org/trac/boost/changeset/60522
Log:
Fix tests for gcc
Text files modified:
branches/units/autoprefix/libs/units/test/test_output.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
Modified: branches/units/autoprefix/libs/units/test/test_output.cpp
==============================================================================
--- branches/units/autoprefix/libs/units/test/test_output.cpp (original)
+++ branches/units/autoprefix/libs/units/test/test_output.cpp 2010-03-12 11:25:42 EST (Fri, 12 Mar 2010)
@@ -287,12 +287,17 @@
BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<double>::max()*meter_base_unit::unit_type(), "1.79769e+308 meter");
BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<double>::min()*meter_base_unit::unit_type(), "2.22507e-308 meter");
// Infinity and NaN
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<float>::infinity()*meter_base_unit::unit_type(), "1.#INF meter");
BOOST_UNITS_TEST_OUTPUT(-std::numeric_limits<float>::infinity()*meter_base_unit::unit_type(), "-1.#INF meter");
BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<double>::quiet_NaN()*meter_base_unit::unit_type(), "1.#QNAN meter");
BOOST_UNITS_TEST_OUTPUT(-std::numeric_limits<double>::quiet_NaN()*meter_base_unit::unit_type(), "-1.#IND meter");
-#elif
+#elif defined(__GLIBCXX__)
+ BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<float>::infinity()*meter_base_unit::unit_type(), "inf meter");
+ BOOST_UNITS_TEST_OUTPUT(-std::numeric_limits<float>::infinity()*meter_base_unit::unit_type(), "-inf meter");
+ BOOST_UNITS_TEST_OUTPUT(std::numeric_limits<double>::quiet_NaN()*meter_base_unit::unit_type(), "nan meter");
+ BOOST_UNITS_TEST_OUTPUT(-std::numeric_limits<double>::quiet_NaN()*meter_base_unit::unit_type(), "nan meter");
+#else
// TODO infinity on other platforms?
#endif
BOOST_UNITS_TEST_OUTPUT(1.5*velocity(), "1.5 meter second^-1");
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