TestAssert.h File Reference
#include <cppunit/Portability.h>
#include <cppunit/Exception.h>
#include <cppunit/Asserter.h>
#include <cppunit/portability/Stream.h>
#include <float.h>
Go to the source code of this file.
Defines
Assertions that a condition is
true
.
Assertion with a user specified message.
Fails with the specified message.
Asserts that two values are equals.
Asserts that two values are equals, provides additional message on failure.
Macro for primitive double value comparisons.
Macro for primitive double value comparisons, setting a user-supplied message in case of failure.
Asserts that the given expression throws an exception of the specified type.
Asserts that the given expression throws an exception of the specified type, setting a user supplied message in case of failure.
Asserts that the given expression does not throw any exceptions.
Asserts that the given expression does not throw any exceptions, setting a user supplied message in case of failure.
Asserts that an assertion fail.
Asserts that an assertion fail, with a user-supplied message in case of error.
Asserts that an assertion pass.
Asserts that an assertion pass, with a user-supplied message in case of failure.
Functions
template<class T>
(Implementation) Asserts that two objects of the same type are equals. Use CPPUNIT_ASSERT_EQUAL instead of this function.
(Implementation) Asserts that two double are equals given a tolerance. Use CPPUNIT_ASSERT_DOUBLES_EQUAL instead of this function.
Define Documentation
#define CPPUNIT_EXTRACT_EXCEPTION_TYPE_
(
exception,
no_rtti_message
)
std::string( no_rtti_message )
#define CPPUNIT_GET_PARAMETER_STRING
(
parameter
)
#parameter
Function Documentation
void CPPUNIT_API assertDoubleEquals
(
double
expected,
double
actual,
double
delta,
const std::string &
message
)
(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,
const std::string &
message
)