This base class represents a test object. It is used to implement unit tests for any code. Typically a set of tests is collected in one derived test class.
More...
|
| | Test ()=default |
| | Constructor.
|
| |
| | ~Test ()=default |
| | Destructor.
|
| |
| const String & | name () const |
| | Returns the name of the test.
|
| |
| void | setName (const String &name) |
| | Set the name of the text.
|
| |
| virtual void | doTest ()=0 |
| | This is the main test method, which must be implemented by every derived test class.
|
| |
| void | testUnexpectedException (const String &failmessage) const |
| | This method shall be called in the catch clause of an jm::Exception.
|
| |
| | Object () noexcept |
| | Constructor.
|
| |
| virtual | ~Object () noexcept |
| | Destructor.
|
| |
| void | release () noexcept |
| | Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
|
| |
| Object * | retain () noexcept |
| | Increases the reference counter of this object by 1.
|
| |
| Object * | autorelease () noexcept |
| | Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
|
| |
| int32 | referenceCount () const noexcept |
| | Returns the value of the reference counter.
|
| |
| virtual bool | equals (const Object *other) const |
| | Comparison of objects.
|
| |
| virtual String | displayName () const |
| | Returns the display name of the object intended to present to a user.
|
| |
| virtual void | printDiffInfo (DiffOperation operation, Object *other) const |
| | Output method for outputting the diff results for the diff algorithm.
|
| |
| void | setHighBit (bool status) noexcept |
| |
| bool | highBit () const noexcept |
| |
|
| void | setErrorCode (const String &error) |
| | Set the error message of this test.
|
| |
| const String & | errorCode () const |
| | Returns the (last) error message.
|
| |
| void | testFail (const String &message) const |
| | Call this method, if you made a test by yourself and this test failed.
|
| |
| void | testEquals (const double actual, const double expected, const String &failmessage) const |
| | This method tests, if double actual is equal to expected under consideration of RESABS.
|
| |
| void | testEquals (int64 actual, int64 expected, const String &failmessage) const |
| | This method tests, if Integer actual is equal to expected.
|
| |
| void | testEquals (int64 actual, int32 expected, const String &failmessage) const |
| | This method tests, if Integer actual is equal to expected.
|
| |
| void | testEquals (uint64 actual, uint64 expected, const String &failmessage) const |
| | This method tests, if uint64 actual is equal to expected.
|
| |
| void | testEquals (void *actual, void *expected, const String &failmessage) const |
| | This method tests, if void* actual is equal to expected.
|
| |
| void | testEquals (uint64 actual, int32 expected, const String &failmessage) const |
| | This method tests, if uint64 actual is equal to expected.
|
| |
| void | testEquals (uint64 actual, uint32 expected, const String &failmessage) const |
| | This method tests, if uint64 actual is equal to expected.
|
| |
| void | testEquals (int32 actual, int32 expected, const String &failmessage) const |
| | This method tests, if int32 actual is equal to expected.
|
| |
| void | testEquals (uint32 actual, uint32 expected, const String &failmessage) const |
| | This method tests, if uint32 actual is equal to expected.
|
| |
| void | testEquals (uint32 actual, int32 expected, const String &failmessage) const |
| | This method tests, if uint32 actual is equal to expected.
|
| |
| void | testEquals (int32 actual, uint32 expected, const String &failmessage) const |
| | This method tests, if int32 actual is equal to expected.
|
| |
| void | testEquals (const String &actual, const String &expected, const String &failmessage) const |
| | This method tests, if String actual is equal to expected.
|
| |
| void | testEqualsIgnoreCase (const String &actual, const String &expected, const String &failmessage) const |
| | This method tests, if String actual is equal to expected ignoring cases.
|
| |
| void | testNull (const void *actual, const String &failmessage) const |
| | This method tests, if actual is NULL.
|
| |
| void | testNotNull (const void *actual, const String &failmessage) const |
| | This method tests, if actual is not NULL.
|
| |
| void | testTrue (bool actual, const String &failmessage) const |
| | This method tests, if actual is true.
|
| |
| void | testFalse (bool actual, const String &failmessage) const |
| | This method tests, if actual is false.
|
| |
This base class represents a test object. It is used to implement unit tests for any code. Typically a set of tests is collected in one derived test class.