CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
|
Go to the source code of this file.
Namespaces | |
namespace | cpunit |
namespace | cpunit::priv |
Functions | |
template<class T > | |
void | cpunit::assert_equals (const std::string &msg, const T &expected, const T &actual) |
Check that two objects are equal, using ==. | |
template<class T > | |
void | cpunit::assert_equals (const T &expected, const T &actual) |
Check that two objects are equal, using ==. | |
template<class T , class Eq > | |
void | cpunit::assert_equals (const std::string &msg, const T &expected, const T &actual, const Eq &eq) |
Check that two objects are equal, using a custom comparator. | |
template<class T , class Eq > | |
void | cpunit::assert_equals (const T &expected, const T &actual, const Eq &eq) |
Check that two objects are equal, using a custom comparator. | |
void | cpunit::assert_equals (const std::string &msg, const double expected, const double actual, const double error) |
Check that two floating point numbers are sufficiently closed to be reckoned as equal. | |
void | cpunit::assert_equals (const double expected, const double actual, const double error) |
Check that two floating point numbers are sufficiently closed to be reckoned as equal. | |
void | cpunit::assert_equals (const std::string &msg, const char *expected, const char *actual) |
Check that two C-strings are equal, using the == operator of std::string. | |
void | cpunit::assert_equals (const char *expected, const char *actual) |
Check that two C-strings are equal, using the == operator of std::string. | |
void | cpunit::assert_equals (const std::string &msg, const std::string &expected, const std::string &actual) |
Check that two strings are equal, using the == operator of std::string. | |
void | cpunit::assert_equals (const std::string &expected, const std::string &actual) |
Check that two strings are equal, using the == operator of std::string. | |
void | cpunit::assert_true (const std::string &msg, const bool statement) |
Checks that a statement is true . | |
void | cpunit::assert_true (const bool statement) |
Checks that a statement is true . | |
void | cpunit::assert_false (const std::string &msg, const bool statement) |
Checks that a statement is false . | |
void | cpunit::assert_false (const bool statement) |
Checks that a statement is false . | |
void | cpunit::assert_not_null (const std::string &msg, const void *data) |
Checks that a pointer is not NULL . | |
void | cpunit::assert_not_null (const void *data) |
Checks that a pointer is not NULL . | |
void | cpunit::assert_null (const std::string &msg, const void *data) |
Checks that a pointer is NULL . | |
void | cpunit::assert_null (const void *data) |
Checks that a pointer is NULL . | |
void | cpunit::fail (const std::string &msg) |
Causes an AssertionException to be thrown. | |
void | cpunit::fail () |
Causes an AssertionException to be thrown. | |
template<class T > | |
T | cpunit::priv::max (const T &a, const T &b) |
Returns the larger of two values. | |
template<class T > | |
T | cpunit::priv::abs (const T &a) |
Returns the absolute value of an object. | |
template<class T > | |
void | cpunit::priv::fail_equals (const std::string &msg, const T &expected, const T &actual) |
Throws an AssertionException with a message consistent with being the cause of a failed assert_equals call. |