summaryrefslogtreecommitdiff
path: root/src/cppunit/TestAssert.cpp
blob: 484f37222f7527b15644799a76b878bfc702ef61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if HAVE_CMATH
#   include <cmath>
#else
#   include <math.h>
#endif

#include <cppunit/TestAssert.h>


CPPUNIT_NS_BEGIN


void 
assertDoubleEquals( double expected,
                    double actual,
                    double delta,
                    SourceLine sourceLine )
{
  Asserter::failNotEqualIf( fabs( expected - actual ) > delta,
                            assertion_traits<double>::toString(expected),
                            assertion_traits<double>::toString(actual),
                            sourceLine );
}


CPPUNIT_NS_END