dump expected data when audioconvert test fails

Original commit message from CVS:
dump expected data when audioconvert test fails
This commit is contained in:
Thomas Vander Stichele 2006-04-29 12:10:52 +00:00
parent 68cccf37b1
commit 27f506f583

View file

@ -196,6 +196,13 @@ verify_convert (const gchar * which, void *in, int inlength,
ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1); ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), outlength); fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), outlength);
if (memcmp (GST_BUFFER_DATA (outbuffer), out, outlength) != 0) {
g_print ("\nConverted data:\n");
gst_util_dump_mem (GST_BUFFER_DATA (outbuffer), outlength);
g_print ("\nExpected data:\n");
gst_util_dump_mem (out, outlength);
}
fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, outlength) == 0, fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, outlength) == 0,
"failed converting %s", which); "failed converting %s", which);
buffers = g_list_remove (buffers, outbuffer); buffers = g_list_remove (buffers, outbuffer);