CppUnit project page FAQ

Static Public Member Functions | List of all members
assertion_traits< double > Struct Reference

Traits used by CPPUNIT_ASSERT_DOUBLES_EQUAL(). More...

#include <TestAssert.h>

Static Public Member Functions

static bool equal (double x, double y)
 
static bool less (double x, double y)
 
static bool lessEqual (double x, double y)
 
static std::string toString (double x)
 

Detailed Description

Traits used by CPPUNIT_ASSERT_DOUBLES_EQUAL().

This specialisation from struct assertion_traits<> ensures that doubles are converted in full, instead of being rounded to the default 6 digits of precision. Use the system defined ISO C99 macro DBL_DIG within float.h is available to define the maximum precision, otherwise use the hard-coded maximum precision of 15.

Member Function Documentation

◆ equal()

static bool assertion_traits< double >::equal ( double  x,
double  y 
)
inlinestatic

◆ less()

static bool assertion_traits< double >::less ( double  x,
double  y 
)
inlinestatic

◆ lessEqual()

static bool assertion_traits< double >::lessEqual ( double  x,
double  y 
)
inlinestatic

◆ toString()

static std::string assertion_traits< double >::toString ( double  x)
inlinestatic

The documentation for this struct was generated from the following file:

Send comments to:
CppUnit Developers