CppUnit project page | FAQ |
#include <Asserter.h>
Static Public Member Functions | |
static NORETURN void CPPUNIT_API | fail (const Message &message, const SourceLine &sourceLine=SourceLine()) |
Throws a Exception with the specified message and location. | |
static NORETURN void CPPUNIT_API | fail (std::string message, const SourceLine &sourceLine=SourceLine()) |
Throws a Exception with the specified message and location. | |
static void CPPUNIT_API | failIf (bool shouldFail, const Message &message, const SourceLine &sourceLine=SourceLine()) |
Throws a Exception with the specified message and location. | |
static void CPPUNIT_API | failIf (bool shouldFail, std::string message, const SourceLine &sourceLine=SourceLine()) |
Throws a Exception with the specified message and location. | |
static std::string CPPUNIT_API | makeExpected (const std::string &expectedValue) |
Returns a expected value string for a message, case equal than Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions. | |
static std::string CPPUNIT_API | makeExpectedEqual (const std::string &expectedValue) |
Returns a expected value string for a message, case equal than Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions. | |
static std::string CPPUNIT_API | makeExpectedLess (const std::string &expectedValue) |
Returns a expected value string for a message, case less than. | |
static std::string CPPUNIT_API | makeExpectedLessEqual (const std::string &expectedValue) |
Returns a expected value string for a message, case less or equal than. | |
static std::string CPPUNIT_API | makeExpectedGreater (const std::string &expectedValue) |
Returns a expected value string for a message, case greater than. | |
static std::string CPPUNIT_API | makeExpectedGreaterEqual (const std::string &expectedValue) |
Returns a expected value string for a message, greater or equal than. | |
static std::string CPPUNIT_API | makeActual (const std::string &actualValue) |
Returns an actual value string for a message. Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions. | |
static Message CPPUNIT_API | makeNotEqualMessage (const std::string &expectedValue, const std::string &actualValue, const AdditionalMessage &additionalMessage=AdditionalMessage(), const std::string &shortDescription="equality assertion failed") |
static Message CPPUNIT_API | makeMessage (const std::string &expectedValue, const std::string &actualValue, const std::string &shortDescription, const AdditionalMessage &additionalMessage=AdditionalMessage()) |
static NORETURN void CPPUNIT_API | failNotEqual (std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="equality assertion failed") |
Throws an Exception with the specified message and location. | |
static void CPPUNIT_API | failNotLess (std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="less assertion failed") |
Throws an Exception with the specified message and location. | |
static void CPPUNIT_API | failNotGreater (std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="greater assertion failed") |
Throws an Exception with the specified message and location. | |
static void CPPUNIT_API | failNotLessEqual (std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="less equal assertion failed") |
Throws an Exception with the specified message and location. | |
static void CPPUNIT_API | failNotGreaterEqual (std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="greater equal assertion failed") |
Throws an Exception with the specified message and location. | |
static void CPPUNIT_API | failNotEqualIf (bool shouldFail, std::string expected, std::string actual, const SourceLine &sourceLine, const AdditionalMessage &additionalMessage=AdditionalMessage(), std::string shortDescription="equality assertion failed") |
Throws an Exception with the specified message and location. | |
|
static |
Throws a Exception with the specified message and location.
|
static |
Throws a Exception with the specified message and location.
|
static |
|
static |
Throws a Exception with the specified message and location.
shouldFail | if true then the exception is thrown. Otherwise nothing happen. |
message | Message explaining the assertion failiure. |
sourceLine | Location of the assertion. |
|
static |
Throws an Exception with the specified message and location.
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report what are the differences between the expected and actual value. |
shortDescription | Short description for the failure message. |
|
static |
Throws an Exception with the specified message and location.
shouldFail | if true then the exception is thrown. Otherwise nothing happen. |
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report where the "difference" is located. |
shortDescription | Short description for the failure message. |
|
static |
Throws an Exception with the specified message and location.
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report what are the differences between the expected and actual value. |
shortDescription | Short description for the failure message. |
|
static |
Throws an Exception with the specified message and location.
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report what are the differences between the expected and actual value. |
shortDescription | Short description for the failure message. |
|
static |
Throws an Exception with the specified message and location.
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report what are the differences between the expected and actual value. |
shortDescription | Short description for the failure message. |
|
static |
Throws an Exception with the specified message and location.
expected | Text describing the expected value. |
actual | Text describing the actual value. |
sourceLine | Location of the assertion. |
additionalMessage | Additional message. Usually used to report what are the differences between the expected and actual value. |
shortDescription | Short description for the failure message. |
|
static |
Returns an actual value string for a message. Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions.
actualValue | String that represents the actual value. |
|
static |
Returns a expected value string for a message, case equal than Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions.
expectedValue | String that represents the expected value. |
|
static |
Returns a expected value string for a message, case equal than Typically used to create 'not equal' message, or to check that a message contains the expected content when writing unit tests for your custom assertions.
expectedValue | String that represents the expected value. |
|
static |
Returns a expected value string for a message, case greater than.
expectedValue | String that represents the expected value. |
|
static |
Returns a expected value string for a message, greater or equal than.
expectedValue | String that represents the expected value. |
|
static |
Returns a expected value string for a message, case less than.
expectedValue | String that represents the expected value. |
|
static |
Returns a expected value string for a message, case less or equal than.
expectedValue | String that represents the expected value. |
|
static |
|
static |
Send comments to: CppUnit Developers |