-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST_STRING_EQUAL method #47
Comments
One of the original motivations for Acutest was my dislike of baroque interfaces in existing solutions which provide a comparison macro for every combination of type and comparison operator and sometime even for some other aspect of the test (e.g. assert-like versus check-like behavior). See e.g. https://github.com/ThrowTheSwitch/Unity/blob/ae8b98e80b716eb6c627f1c98261ffe9f9d3acca/src/unity.h#L124 for an example what I mean. To clarify: that's not meant as an objective criticism, it's just a matter of my subjective taste. I am willing to make some concessions where there is a wide consensus that the potential benefit outweighs the purity of the interface (and the string comparison might perhaps be that case). But let me state clearly that I don't want to end up with the dozens of comparison macros like in the linked example. And actually even here I am wondering whether you are proposing just the one macro, or implicitly also |
Why there is no method for string comparison?
TEST_CHECK(strcmp(produced, expected) == 0) is not very comfortable.
I think for exampleTEST_STRING_EQUAL("123456789","123567899") which will write to output
smthn like "
String Check Failed
123456789
123567899
>>>4!=5
" will be very useful for many purposes
I can implement it
The text was updated successfully, but these errors were encountered: