[gst-cvs] gst-plugins-good: id3v2mux: Make the test failure slightly more informative

Jan Schmidt thaytan at kemper.freedesktop.org
Wed May 6 06:31:00 PDT 2009


Module: gst-plugins-good
Branch: master
Commit: a32be6f170d2dca1cb0cb3a03bcee760548b15fe
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=a32be6f170d2dca1cb0cb3a03bcee760548b15fe

Author: Jan Schmidt <thaytan at noraisin.net>
Date:   Sat Apr 18 17:23:51 2009 +0100

id3v2mux: Make the test failure slightly more informative

---

 tests/check/elements/id3v2mux.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/check/elements/id3v2mux.c b/tests/check/elements/id3v2mux.c
index 6b863f5..fa9e554 100644
--- a/tests/check/elements/id3v2mux.c
+++ b/tests/check/elements/id3v2mux.c
@@ -354,6 +354,7 @@ test_taglib_id3mux_with_tags (GstTagList * tags, guint32 mask)
   guint64 offset;
   GstBuffer *outbuf = NULL;
   GstBuffer *tagbuf = NULL;
+  GstStateChangeReturn state_result;
 
   pipeline = gst_pipeline_new ("pipeline");
   g_assert (pipeline != NULL);
@@ -397,8 +398,10 @@ test_taglib_id3mux_with_tags (GstTagList * tags, guint32 mask)
 
   GST_LOG ("setting and getting state ...");
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
-  fail_unless (gst_element_get_state (pipeline, NULL, NULL,
-          -1) == GST_STATE_CHANGE_SUCCESS);
+  state_result = gst_element_get_state (pipeline, NULL, NULL, -1);
+  fail_unless (state_result == GST_STATE_CHANGE_SUCCESS,
+      "Unexpected result from get_state(). Expected success, got %d",
+      state_result);
 
   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
 





More information about the Gstreamer-commits mailing list