Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53780 - trunk/libs/random
From: steven_at_[hidden]
Date: 2009-06-09 22:16:25


Author: steven_watanabe
Date: 2009-06-09 22:16:24 EDT (Tue, 09 Jun 2009)
New Revision: 53780
URL: http://svn.boost.org/trac/boost/changeset/53780

Log:
Test tweaks
Text files modified:
   trunk/libs/random/instantiate.cpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/libs/random/instantiate.cpp
==============================================================================
--- trunk/libs/random/instantiate.cpp (original)
+++ trunk/libs/random/instantiate.cpp 2009-06-09 22:16:24 EDT (Tue, 09 Jun 2009)
@@ -69,10 +69,12 @@
     (void) genptr();
 #endif
   }
+ // If the values are not exactly equal, we cannot
+ // rely on them being close...
   typename Dist::result_type g = gen();
- BOOST_CHECK(std::abs(g - genref()) < 1e-6);
+ BOOST_CHECK_EQUAL(g, genref());
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- BOOST_CHECK(std::abs(g - genptr()) < 1e-6);
+ BOOST_CHECK_EQUAL(g, genptr());
 #endif
 
   (void) gen.engine();


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