Skip to content
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

Is there any use for a macro comparing raw bytes? #157

Open
iboukhss opened this issue May 9, 2024 · 1 comment
Open

Is there any use for a macro comparing raw bytes? #157

iboukhss opened this issue May 9, 2024 · 1 comment

Comments

@iboukhss
Copy link

iboukhss commented May 9, 2024

I was wondering why is there not a macro that uses compares raw bytes with memcmp() in utest.h?
I feel like it could be useful when you need to compare anything else other than strings. Of course you always can wrap memcmp() around ASSERT_TRUE but then you don't get the nice output that tells you at which offset there is a difference in case of failure.
Perhaps there is another way to do it that I missed?

@sheredom
Copy link
Owner

Just never needed it myself! Could be added I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants