MQLUNIT
|
I see a lot of compilation errors.
You are likely to forgot to add TEST_END macro at the end of the test case.
Test case definition should look like this.
I implemented operator== but ASSERT_EQUALS always fails anyway.
Remember to dereference object pointers. When using pointers in ASSERT_EQUALS directly you are comparing pointers themselves, not referenced objects.
Here is the correct way of checking dynamic objects for equality.
My test passes when it clearly should fail.
Do not ever set a failure message to NULL
when calling ASSERT
macros. Unlike other testing frameworks, MQLUNIT uses a message text to signal an assertion failure. NULL
means there were no failures, so by using a NULL
as a failure message you are causing the test to alway succeed. Use an empty string if don't want to use any specific failure description.
Copyright © 2017 Eneset Group Trust |