From 7ebd6a126d9932d55bc761cc66bd813c9e9147c9 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 10 May 2006 15:49:30 +0000 Subject: [PATCH] libs/gst/check/gstcheck.h: add an assert for setting state to avoid lots of repetitive code in the future Original commit message from CVS: 2006-05-10 Thomas Vander Stichele * libs/gst/check/gstcheck.h: add an assert for setting state to avoid lots of repetitive code in the future --- ChangeLog | 6 ++++++ libs/gst/check/gstcheck.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index bb1e97bd0a..1a4db4cc66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-10 Thomas Vander Stichele + + * libs/gst/check/gstcheck.h: + add an assert for setting state to avoid lots of repetitive code + in the future + 2006-05-10 Thomas Vander Stichele * gst/gstvalue.c: (gst_value_serialize_flags): diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h index 356617c957..749ccc8850 100644 --- a/libs/gst/check/gstcheck.h +++ b/libs/gst/check/gstcheck.h @@ -257,6 +257,10 @@ G_STMT_START { \ name " refcount is %d instead of %d", rc, value);\ } G_STMT_END +#define ASSERT_SET_STATE(element, state, ret) \ +fail_unless (gst_element_set_state (element, \ + state) == ret, \ + "could not change state to " #state); #endif /* __GST_CHECK_H__ */