Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61456 - trunk/libs/tr1/test
From: john_at_[hidden]
Date: 2010-04-21 06:59:44


Author: johnmaddock
Date: 2010-04-21 06:59:43 EDT (Wed, 21 Apr 2010)
New Revision: 61456
URL: http://svn.boost.org/trac/boost/changeset/61456

Log:
Fix inspection report issues.
Text files modified:
   trunk/libs/tr1/test/run_complex_overloads.cpp | 60 ++++++++++++++++++++--------------------
   1 files changed, 30 insertions(+), 30 deletions(-)

Modified: trunk/libs/tr1/test/run_complex_overloads.cpp
==============================================================================
--- trunk/libs/tr1/test/run_complex_overloads.cpp (original)
+++ trunk/libs/tr1/test/run_complex_overloads.cpp 2010-04-21 06:59:43 EDT (Wed, 21 Apr 2010)
@@ -34,7 +34,7 @@
 //
 
 template <class T, class U>
-void check(const T& t, const U& u)
+void do_check(const T& t, const U& u)
 {
    static const T two = 2;
    static const T factor = std::pow(two, 1-std::numeric_limits<T>::digits) * 200;
@@ -43,11 +43,11 @@
 }
 
 template <class T, class U>
-void check(const std::complex<T>& t, const std::complex<U>& u)
+void do_check(const std::complex<T>& t, const std::complex<U>& u)
 {
    BOOST_STATIC_ASSERT((::boost::is_same<T,U>::value));
- check(t.real(), u.real());
- check(t.imag(), u.imag());
+ do_check(t.real(), u.real());
+ do_check(t.imag(), u.imag());
 }
 
 template <class T>
@@ -62,26 +62,26 @@
    if(val)
    {
       std::cout << " Testing std::arg.\n";
- check(std::arg(cval), std::arg(rval));
- check(std::arg(cval), std::arg(val));
+ do_check(std::arg(cval), std::arg(rval));
+ do_check(std::arg(cval), std::arg(val));
    }
    std::cout << " Testing std::norm.\n";
- check(std::norm(cval), std::norm(rval));
- check(std::norm(cval), std::norm(val));
+ do_check(std::norm(cval), std::norm(rval));
+ do_check(std::norm(cval), std::norm(val));
    std::cout << " Testing std::conj.\n";
- check(std::conj(cval), std::conj(rval));
- check(std::conj(cval), std::conj(val));
+ do_check(std::conj(cval), std::conj(rval));
+ do_check(std::conj(cval), std::conj(val));
    std::cout << " Testing std::polar.\n";
- check(std::polar(val), std::polar(rval));
- check(std::polar(val, 0), std::polar(rval, 0));
- check(std::polar(val, val), std::polar(rval, rval));
- check(std::polar(val, rval), std::polar(rval, val));
+ do_check(std::polar(val), std::polar(rval));
+ do_check(std::polar(val, 0), std::polar(rval, 0));
+ do_check(std::polar(val, val), std::polar(rval, rval));
+ do_check(std::polar(val, rval), std::polar(rval, val));
    std::cout << " Testing std::real.\n";
- check(std::real(cval), std::real(rval));
- check(std::real(cval), std::real(val));
+ do_check(std::real(cval), std::real(rval));
+ do_check(std::real(cval), std::real(val));
    std::cout << " Testing std::imaj.\n";
- check(std::imag(cval), std::imag(rval));
- check(std::imag(cval), std::imag(val));
+ do_check(std::imag(cval), std::imag(rval));
+ do_check(std::imag(cval), std::imag(val));
    if(val && !boost::is_floating_point<T>::value)
    {
       //
@@ -92,14 +92,14 @@
       // Darwin is a particularly bad example !
       //
       std::cout << " Testing std::pow.\n";
- check(std::pow(cval, cval), std::pow(cval, val));
- check(std::pow(cval, cval), std::pow(cval, rval));
- check(std::pow(cval, cval), std::pow(val, cval));
- check(std::pow(cval, cval), std::pow(rval, cval));
+ do_check(std::pow(cval, cval), std::pow(cval, val));
+ do_check(std::pow(cval, cval), std::pow(cval, rval));
+ do_check(std::pow(cval, cval), std::pow(val, cval));
+ do_check(std::pow(cval, cval), std::pow(rval, cval));
    }
 }
 
-void check(double i)
+void do_check(double i)
 {
    std::cout << "Checking type double with value " << i << std::endl;
    check_val(i);
@@ -109,7 +109,7 @@
    check_val(static_cast<long double>(i));
 }
 
-void check(int i)
+void do_check(int i)
 {
    std::cout << "Checking type char with value " << i << std::endl;
    check_val(static_cast<char>(i));
@@ -140,16 +140,16 @@
    std::cout << "Checking type unsigned __int64 with value " << i << std::endl;
    check_val(static_cast<unsigned __int64>(i));
 #endif
- check(static_cast<double>(i));
+ do_check(static_cast<double>(i));
 }
 
 int test_main(int, char*[])
 {
- check(0);
- check(0.0);
- check(1);
- check(1.5);
- check(0.5);
+ do_check(0);
+ do_check(0.0);
+ do_check(1);
+ do_check(1.5);
+ do_check(0.5);
    return 0;
 }
 


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