mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 07:53:39 +02:00
gtestutils: add g_assert_cmpmem()
Add a test macro to compare two buffers (which are not already known to be the same length) for equality. https://bugzilla.gnome.org/show_bug.cgi?id=754283
This commit is contained in:
@@ -835,8 +835,7 @@ test_peer (void)
|
||||
&len2,
|
||||
&error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_cmpint (len, ==, len2);
|
||||
g_assert (memcmp (buf, buf2, len) == 0);
|
||||
g_assert_cmpmem (buf, len, buf2, len2);
|
||||
g_free (buf2);
|
||||
g_free (buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user