From 5d87c67d6b5d5bd9203e02c440e1c9371acc9cfb Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 28 Nov 2005 21:51:37 +0000 Subject: [PATCH] check/pipelines/simple_launch_lines.c: use more check API and less GLib API Original commit message from CVS: * check/pipelines/simple_launch_lines.c: (setup_pipeline), (GST_START_TEST): use more check API and less GLib API --- ChangeLog | 6 ++++++ check/pipelines/simple_launch_lines.c | 8 +++++--- tests/check/pipelines/simple-launch-lines.c | 8 +++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d028ca1ed..b3960d65c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-28 Thomas Vander Stichele + + * check/pipelines/simple_launch_lines.c: (setup_pipeline), + (GST_START_TEST): + use more check API and less GLib API + 2005-11-28 Thomas Vander Stichele * Makefile.am: diff --git a/check/pipelines/simple_launch_lines.c b/check/pipelines/simple_launch_lines.c index 174c2173aa..c588181569 100644 --- a/check/pipelines/simple_launch_lines.c +++ b/check/pipelines/simple_launch_lines.c @@ -29,7 +29,7 @@ setup_pipeline (gchar * pipe_descr) GstElement *pipeline; pipeline = gst_parse_launch (pipe_descr, NULL); - g_return_val_if_fail (GST_IS_PIPELINE (pipeline), NULL); + fail_unless (GST_IS_PIPELINE (pipeline)); return pipeline; } @@ -158,7 +158,7 @@ GST_START_TEST (test_stop_from_app) fakesink = gst_element_factory_make ("fakesink", NULL); pipeline = gst_element_factory_make ("pipeline", NULL); - g_return_if_fail (fakesrc && fakesink && pipeline); + fail_unless (fakesrc && fakesink && pipeline); gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL); gst_element_link (fakesrc, fakesink); @@ -179,7 +179,9 @@ GST_START_TEST (test_stop_from_app) } else { rmessage = GST_MESSAGE_UNKNOWN; } - g_return_if_fail (rmessage == GST_MESSAGE_APPLICATION); + fail_unless (rmessage == GST_MESSAGE_APPLICATION, + "polled message is not APPLICATION but %s", + gst_message_type_get_name (rmessage)); gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline); diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c index 174c2173aa..c588181569 100644 --- a/tests/check/pipelines/simple-launch-lines.c +++ b/tests/check/pipelines/simple-launch-lines.c @@ -29,7 +29,7 @@ setup_pipeline (gchar * pipe_descr) GstElement *pipeline; pipeline = gst_parse_launch (pipe_descr, NULL); - g_return_val_if_fail (GST_IS_PIPELINE (pipeline), NULL); + fail_unless (GST_IS_PIPELINE (pipeline)); return pipeline; } @@ -158,7 +158,7 @@ GST_START_TEST (test_stop_from_app) fakesink = gst_element_factory_make ("fakesink", NULL); pipeline = gst_element_factory_make ("pipeline", NULL); - g_return_if_fail (fakesrc && fakesink && pipeline); + fail_unless (fakesrc && fakesink && pipeline); gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL); gst_element_link (fakesrc, fakesink); @@ -179,7 +179,9 @@ GST_START_TEST (test_stop_from_app) } else { rmessage = GST_MESSAGE_UNKNOWN; } - g_return_if_fail (rmessage == GST_MESSAGE_APPLICATION); + fail_unless (rmessage == GST_MESSAGE_APPLICATION, + "polled message is not APPLICATION but %s", + gst_message_type_get_name (rmessage)); gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline);