diff --git a/ChangeLog b/ChangeLog
index bb1e97bd0a..1a4db4cc66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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):
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__ */