From: Chris P. <chr...@ma...> - 2016-07-30 23:02:59
|
Hi Nick, It sounds fine to me. How about if you get it working for your own project and then show us what it looks like? For a long enough buffer you'll want some kind of start offset plus a window that starts before the differences and finishes after them. Maybe somebody has already built a nice bindiff? It could be fiddly, consider if there are multiple bits of the binary that differ. I'm not sure but bin_eq might be a better name than hex_eq. Chris Nicholas Humfrey wrote: > Hello, > > I have been working on project that has tests that do quite a bit of > comparing between binary buffers. I have thought that a > ck_assert_hex_eq() assertion would be useful, that compares two pointers > and displays the difference, in hex, if they are not equal. > > ck_assert_hex_eq(X, Y, len); > > Internally it would use memcmp() to perform the comparison. > The complexity would be in printing the difference as hex. > > > Would there be any interest in me contributing something like this to > check? > > > nick. > > ------------------------------------------------------------------------------ > _______________________________________________ > Check-devel mailing list > Che...@li... > https://lists.sourceforge.net/lists/listinfo/check-devel |