Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2003-06-14 10:33:36

Bugs item #754551, was opened at 2003-06-14 11:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alain Ross (alain_ross)
Assigned to: Nobody/Anonymous (nobody)
Summary: BOOST_CHECK_CLOSE in Boost Test Library

Initial Comment:
I am running this test under Windows 98 using Microsoft
Visual Studio 6.

The following small test program should return no error
because the both values are in the specified 1e-6 range.

The program returns this unsuspected output:

Running 1 test case...
(48): error in "BOOST_CHECK_
CLOSE_test": test 1.49012e-8 ~= 0.0 failed [1.49012e-
008 !~= 0 (+/-1e-006)]

*** 1 failure detected in test suite "Test

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
using boost::unit_test_framework::test_suite;

void BOOST_CHECK_CLOSE_test( void )
   BOOST_CHECK_CLOSE( 1.49012e-8, 0.0, 1e-6 );

test_suite* init_unit_test_suite( int argc, char *argv[] )
   test_suite *test = BOOST_TEST_SUITE( "Test
   test->add( BOOST_TEST_CASE(
   return test;


You can respond by visiting:

This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at