libs/gst/check/gstcheck.h: add an assert for setting state to avoid lots of repetitiv...
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 10 May 2006 15:49:30 +0000 (15:49 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 10 May 2006 15:49:30 +0000 (15:49 +0000)
Original commit message from CVS:
2006-05-10  Thomas Vander Stichele  <thomas at apestaart dot org>

* libs/gst/check/gstcheck.h:
add an assert for setting state to avoid lots of repetitive code
in the future

ChangeLog
libs/gst/check/gstcheck.h

index bb1e97b..1a4db4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-05-10  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * 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  <thomas at apestaart dot org>
+
        * gst/gstvalue.c: (gst_value_serialize_flags):
          fix a leak if no flags are set
        * tests/check/gst/gstvalue.c: (GST_START_TEST):
index 356617c..749ccc8 100644 (file)
@@ -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__ */