|
template<typename T > |
static string | assertEquals (string message, T &expected, T &actual) |
| Asserts that two objects are equal. Object are passed by reference. Pointers must be dereferenced to objects before passed to this method, therefore they must be checked for NULL before checking for equality. More...
|
|
template<typename T > |
static string | assertEquals (string message, T expected, T actual) |
| Asserts that two entities are equal. More...
|
|
template<typename T > |
static string | assertEquals (const string message, const T &expected[], const T &actual[]) |
| Assert that two arrays are equal. Arrays are considered equal if they have the same size and their elements are equal in each position. Equality check for the elements will work with primitive types, strings, object references and pointers. More...
|
|
template<typename T > |
static string | assertSame (string message, T &expected, T &actual) |
| Asserts that two object references refer to the same object. Object are passed by reference. Pointers must be dereferenced to objects before passed to this method, therefore they must be checked for NULL before checking for equality. More...
|
|
template<typename T > |
static string | assertNotSame (string message, T &expected, T &actual) |
| Asserts that two object references do bot refer to the same object. Object are passed by reference. Pointers must be dereferenced to objects before passed to this method, therefore they must be checked for NULL before checking for equality. More...
|
|
template<typename T > |
static string | assertNotNull (string message, T entity) |
| Asserts that the entity is not NULL. Entity can be a variable of a primitive type, object reference or a pointer. More...
|
|
template<typename T > |
static string | assertNull (string message, T entity) |
| Asserts that the entity is NULL. Entity can be a variable of a primitive type, object reference or a pointer. More...
|
|
static string | assertTrue (string message, bool condition) |
| Asserts that the condition is true. More...
|
|
static string | assertEqualsDelta (string message, double expected, double actual, double delta) |
| Asserts that two doubles are equal concerning a delta. More...
|
|
static string | assertFalse (string message, bool condition) |
| Asserts that the condition is false. More...
|
|
static string | fail () |
| Fail the test providing a genertc failure description. More...
|
|
static string | fail (string message) |
| Fail the test providing a specific failure description. More...
|
|
static string | getMessage (const string message) |
| Helper function made public for code reuse. More...
|
|
template<typename T > |
static string | assertEquals (string message, T &expected, T &actual) |
|
template<typename T > |
static string | assertNotNull (string message, T entity) |
|
template<typename T > |
static string | assertNull (string message, T entity) |
|
template<typename T > |
static string | assertSame (string message, T &expected, T &actual) |
|
template<typename T > |
static string | assertNotSame (string message, T &expected, T &actual) |
|
template<typename T > |
static string | assertEquals (string message, const T &expected[], const T &actual[]) |
|
template<typename T > |
static string | assertArrayElement (string message, T &expected, T &actual, uint i) |
|
A set of assert methods.
Due to the absence of exceptions in MQL the following convention is used to specify an assertion error. Each assertion function will return a NULL string in case of a success and the detailed failure description in case of an assertion failure.