Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The development of checkmate has slowed down a bit in the last few months, which is usually a sign that the package is now very mature. Of course, there is still some work to be done, and for the next version some error messages should be improved, among other things.
However, this is only possible if the reverse dependencies do not unit test for the exact error message.
As an example:
used to throw the error message
In the development version of checkmate, I've added the information about which element of the vector is responsible for the assertion to be triggered, and changed the error message to
To overcome this problem, it is generally a good idea in unit tests to not grep on complete error messages, but restrict the expectation to the relevant part. In the above example, "2 characters" or "at least 2 characters" would probably have been sufficient.
This PR addresses failing tests in set expectations, where the error message now gives more precise information about which elements are violating the expectation (instead of having the user parse and compare two printed sets).