|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77302 - trunk/libs/math/test
From: pbristow_at_[hidden]
Date: 2012-03-11 08:49:09
Author: pbristow
Date: 2012-03-11 08:49:08 EDT (Sun, 11 Mar 2012)
New Revision: 77302
URL: http://svn.boost.org/trac/boost/changeset/77302
Log:
Commented out test using defaultfloat as only available on TR1 and C++11 platforms.
Text files modified:
trunk/libs/math/test/test_signed_zero.cpp | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
Modified: trunk/libs/math/test/test_signed_zero.cpp
==============================================================================
--- trunk/libs/math/test/test_signed_zero.cpp (original)
+++ trunk/libs/math/test/test_signed_zero.cpp 2012-03-11 08:49:08 EDT (Sun, 11 Mar 2012)
@@ -1,6 +1,6 @@
-// Copyright (c) 2006 Johan Rade
-// Copyright (c) 2011 Paul A. Bristow To incorporate into Boost.Math
-// Copyright 2012 Paul A. Bristow with new tests.
+// Copyright 2006 Johan Rade
+// Copyright 2011 Paul A. Bristow To incorporate into Boost.Math
+// Copyright 2012 Paul A. Bristow with new tests.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
@@ -14,7 +14,7 @@
#include <boost/test/auto_unit_test.hpp>
#include <boost/math/special_functions/nonfinite_num_facets.hpp>
-#include "s_.ipp" // To create test strings like std::basic_string<CharType> s = S_("0 -0");
+#include "s_.ipp" // To create test strings like std::basic_string<CharType> s = S_("0 -0");
#include <iomanip>
#include <locale>
@@ -50,7 +50,7 @@
template<class CharType, class ValType> void signed_zero_test_impl()
{
if (signbit(static_cast<CharType>(-1e-6f) / (std::numeric_limits<CharType>::max)()) != -0)
- {
+ {
BOOST_TEST_MESSAGE("Signed zero is not supported on this platform!");
return;
}
@@ -63,18 +63,18 @@
std::basic_stringstream<CharType> ss;
ss.imbue(new_locale);
- std::basic_string<CharType> null = S_("");
+ std::basic_string<CharType> null = S_("");
- std::basic_string<CharType> s1 = S_("123");
+ std::basic_string<CharType> s1 = S_("123");
ss << s1 << std::endl;
ss.str(null);
-
- BOOST_CHECK(ss.str() == null); //
+
+ BOOST_CHECK(ss.str() == null); //
ValType a1 = static_cast<ValType>(0); // zero.
ValType a2 = (changesign)(static_cast<ValType>(0)); // negative signed zero.
- BOOST_CHECK(!(signbit)(a1)); //
+ BOOST_CHECK(!(signbit)(a1)); //
BOOST_CHECK((signbit)(a2));
ss << a1 << ' ' << a2;
@@ -131,7 +131,7 @@
CHECKOUT(std::setw(4) << std::internal << std::setfill('*') << 0., "***0"); // left adjust sign and right adjust value
CHECKOUT(std::showpos << std::setw(4) << std::internal << std::setfill('*') << 0., "+**0"); // left adjust sign and right adjust value
CHECKOUT(std::showpoint<< 0., "0.000000"); // std::setprecision(6)
- CHECKOUT(std::setprecision(2) << std::showpoint<< 0., "0.00");
+ CHECKOUT(std::setprecision(2) << std::showpoint<< 0., "0.00");
CHECKOUT(std::fixed << std::setw(5) << std::setfill('0') << std::setprecision(2) << 0., "00.00");
CHECKOUT(std::fixed << std::setw(6) << std::setfill('0') << std::setprecision(2) << 0., "000.00");
@@ -146,7 +146,7 @@
double nz = (changesign)(static_cast<double>(0)); // negative signed zero.
CHECKOUT(nz, "-0");
- CHECKOUT(std::defaultfloat << nz, "-0");
+ // CHECKOUT(std::defaultfloat << nz, "-0"); Only for C++11
CHECKOUT(std::showpos << nz, "-0"); // Ignore showpos because negative.
CHECKOUT(std::setw(2) << nz, "-0");
CHECKOUT(std::setw(4) << nz, " -0");
@@ -162,8 +162,8 @@
CHECKOUT(std::fixed << std::setw(6) << std::setfill('*') << std::setprecision(3) << 0., "*0.000");
CHECKOUT(std::fixed << std::setw(6) << std::setfill('*') << std::setprecision(2) << std::left << 0.0, "0.00**");
- CHECKOUT(std::setprecision(2) << nz, "-0");
- CHECKOUT(std::setprecision(2) << std::showpoint << nz, "-0.00");
+ CHECKOUT(std::setprecision(2) << nz, "-0");
+ CHECKOUT(std::setprecision(2) << std::showpoint << nz, "-0.00");
CHECKOUT(std::fixed << std::showpoint << std::setw(6) << std::setfill('*') << std::setprecision(3) << std::left << 0., "0.000*");
CHECKOUT(std::scientific << std::showpoint << std::setw(10) << std::setfill('*') << std::setprecision(1) << std::left << nz, "-0.0e+000*");
@@ -176,10 +176,10 @@
CHECKOUT(std::showpos << std::fixed << std::setw(6) << std::setfill('*') << std::setprecision(2) << std::left << 1.22, "+1.22*");
CHECKOUT(std::showpos << std::fixed << std::setw(6) << std::setfill('*') << std::setprecision(2) << std::left << 0.12, "+0.12*");
- CHECKOUT(std::setprecision(4) << std::showpoint << 1.2, "1.200");
+ CHECKOUT(std::setprecision(4) << std::showpoint << 1.2, "1.200");
}
-
+
} // anonymous namespace
/*
@@ -198,7 +198,7 @@
Entering test case "misc_output_tests"
Leaving test case "misc_output_tests"; testing time: 15ms
Leaving test suite "Master Test Suite"
-
+
*** No errors detected
*/
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