You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the tests use the standard assert macros, e.g. assert_eq. This make it difficult to see the difference in longer strings and their use of the terms 'left' and 'right' can be confusing when it is not immediately clear which is the 'expected' and which the 'actual' value1.
Additionally the handcrafted assertion helper functions and macros can produce confusing or verbose backtraces.
Enhancement description
Use a more powerful assertion library, see for example:
But check their maintenance status and how widely they are used.
Also try to clean up and improve the helper assertion functions and macros used in the tests of this project.
Alternatives / workarounds
Just try to clean up and improve the assertion code and make sure that the 'left' and 'right' arguments consistently have the same meaning (either 'expected' or 'actual').
Footnotes
Currently the code tries to have the 'expected' first and then the 'actual' (i.e. 'left=expected', 'right=actual'), but it might not be consistent. And in case of test failures this meaning is not obvious from the failure message. ↩
The text was updated successfully, but these errors were encountered:
This reads a bit more natural when left is the actual and right is the
expected value.
However, the tests still have the expected argument left, see also #29.
Problem solved by the enhancement
Currently the tests use the standard
assert
macros, e.g.assert_eq
. This make it difficult to see the difference in longer strings and their use of the terms 'left' and 'right' can be confusing when it is not immediately clear which is the 'expected' and which the 'actual' value1.Additionally the handcrafted assertion helper functions and macros can produce confusing or verbose backtraces.
Enhancement description
Use a more powerful assertion library, see for example:
Blog posts:
But check their maintenance status and how widely they are used.
Also try to clean up and improve the helper assertion functions and macros used in the tests of this project.
Alternatives / workarounds
Just try to clean up and improve the assertion code and make sure that the 'left' and 'right' arguments consistently have the same meaning (either 'expected' or 'actual').
Footnotes
Currently the code tries to have the 'expected' first and then the 'actual' (i.e. 'left=expected', 'right=actual'), but it might not be consistent. And in case of test failures this meaning is not obvious from the failure message. ↩
The text was updated successfully, but these errors were encountered: