CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
|
Functions | |
template<class T > | |
T | max (const T &a, const T &b) |
Returns the larger of two values. | |
template<class T > | |
T | abs (const T &a) |
Returns the absolute value of an object. | |
template<class T > | |
void | 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. |
T cpunit::priv::abs | ( | const T & | a | ) |
Returns the absolute value of an object.
T | The type of object to return the absolute value of. The type must support the unary operator '-', as well as the partial ordering operator '<'. |
a | The object to find the absolute value of. |
Definition at line 131 of file cpunit_Assert.tcc.
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.
T | The type of object failing in comparision. The type must support the std::ostream& operator << (std::ostream&, const T&). |
msg | The text message to show together with the text "ASSERT EQUALS FAILED - ". |
expected | The expected value. |
actual | The actual value. |
AssertionException | allways. |
Definition at line 146 of file cpunit_Assert.tcc.
T cpunit::priv::max | ( | const T & | a, |
const T & | b | ||
) |
Returns the larger of two values.
T | The type of objects to compare. The type must support the partial ordering operator '<'. |
a | The first operand. |
b | The second operand. |
Definition at line 118 of file cpunit_Assert.tcc.