Debugging macro to compare memory regions. If the comparison fails, an error message is logged and the application is either terminated or the testcase marked as failed.
The effect of
g_assert_cmpmem (m1, l1, m2, l2) is
the same as
g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0).
The advantage of this macro is that it can produce a message that
includes the actual values of
m1 may be
NULL if (and only if)
l1 is zero; similarly for
g_assert_cmpmem (buf->data, buf->len, expected, sizeof (expected));
|This function is not directly available to language bindings|