=== modified file 'tests/check/gst/gstevent.c'
--- tests/check/gst/gstevent.c	2006-07-31 13:07:30 +0000
+++ tests/check/gst/gstevent.c	2006-10-01 12:45:33 +0000
@@ -217,6 +217,26 @@
     /* The structure should have been duplicated */
     fail_if (gst_event_get_structure (event) ==
         gst_event_get_structure (event2));
+
+    gst_event_unref (event);
+    gst_event_unref (event2);
+  }
+
+  /* Make events writable */
+  {
+    structure = gst_structure_empty_new ("application/x-custom");
+    fail_if (structure == NULL);
+    event = gst_event_new_custom (GST_EVENT_CUSTOM_BOTH, structure);
+    /* ref the event so that it becomes non-writable */
+    gst_event_ref (event);
+    gst_event_ref (event);
+    event2 =
+      GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
+    fail_unless (event != event2);
+    /* this fail if the structure isn't writable */
+    gst_structure_remove_all_fields ((GstStructure *) gst_event_get_structure (event2));
+
+    gst_event_unref (event);
     gst_event_unref (event);
     gst_event_unref (event2);
   }

