CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TestAssert.h File Reference

#include <cppunit/Portability.h>
#include <cppunit/Exception.h>
#include <cppunit/Asserter.h>

Include dependency graph for TestAssert.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  assertion_traits
 Traits used by CPPUNIT_ASSERT_EQUAL(). More...


Defines

#define CPPUNIT_ASSERT(condition)
 Assertions that a condition is true. More...

#define CPPUNIT_ASSERT_MESSAGE(message, condition)
 Assertion with a user specified message. More...

#define CPPUNIT_FAIL(message)
 Fails with the specified message. More...

#define CPPUNIT_ASSERT_EQUAL(expected, actual)
 Asserts that two values are equals. More...

#define CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual)
 Asserts that two values are equals, provides additional messafe on failure. More...

#define CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, delta)
 Macro for primitive value comparisons. More...

#define CPPUNIT_ASSERT_THROW(expression, ExceptionType)
 Asserts that the given expression throws an exception of the specified type. More...

#define CPPUNIT_EXTRACT_EXCEPTION_TYPE_(exception, no_rtti_message)   std::string( no_rtti_message )
#define CPPUNIT_ASSERT_NO_THROW(expression)
 Asserts that the given expression does not throw any exceptions. More...

#define CPPUNIT_ASSERT_ASSERTION_FAIL(assertion)   CPPUNIT_ASSERT_THROW( assertion, CPPUNIT_NS::Exception )
 Asserts that an assertion fail. More...

#define CPPUNIT_ASSERT_ASSERTION_PASS(assertion)   CPPUNIT_ASSERT_NO_THROW( assertion )
 Asserts that an assertion pass. More...


Functions

template<class T> void assertEquals (const T &expected, const T &actual, SourceLine sourceLine, const std::string &message)
 (Implementation) Asserts that two objects of the same type are equals. Use CPPUNIT_ASSERT_EQUAL instead of this function. More...

void CPPUNIT_API assertDoubleEquals (double expected, double actual, double delta, SourceLine sourceLine)
 (Implementation) Asserts that two double are equals given a tolerance. Use CPPUNIT_ASSERT_DOUBLES_EQUAL instead of this function. More...


Define Documentation

#define CPPUNIT_EXTRACT_EXCEPTION_TYPE_ exception,
no_rtti_message       std::string( no_rtti_message )
 


Function Documentation

void CPPUNIT_API assertDoubleEquals double    expected,
double    actual,
double    delta,
SourceLine    sourceLine
 

(Implementation) Asserts that two double are equals given a tolerance. Use CPPUNIT_ASSERT_DOUBLES_EQUAL instead of this function.

See also:
Asserter::failNotEqual().

template<class T>
void assertEquals const T &    expected,
const T &    actual,
SourceLine    sourceLine,
const std::string &    message
 

(Implementation) Asserts that two objects of the same type are equals. Use CPPUNIT_ASSERT_EQUAL instead of this function.

See also:
assertion_traits, Asserter::failNotEqual().


SourceForge Logo hosts this site. Send comments to:
CppUnit Developers