Original commit message from CVS:
2005-11-19 Andy Wingo <wingo@pobox.com>
* check/gst/gstvalue.c (test_string): Add test for bug #165650.
* gst/gstvalue.c (gst_string_wrap): Trying to serialize a NULL
string should produce an error, given the lack of a way to
represent NULL strings. Fixes #165650.
2005-11-19 Andy Wingo <wingo@pobox.com>
+ * check/gst/gstvalue.c (test_string): Add test for bug #165650.
+
+ * gst/gstvalue.c (gst_string_wrap): Trying to serialize a NULL
+ string should produce an error, given the lack of a way to
+ represent NULL strings. Fixes #165650.
+
* gst/gstvalue.h:
* gst/gstvalue.c (gst_value_array_append_value)
(gst_value_array_prepend_value, gst_value_array_get_size)
"\nserialized : %s\ndeserialized: %s", try[i],
g_value_get_string (&v));
}
+ /* NULL strings should not be serializable */
+ g_value_set_string (&v, NULL);
+ fail_unless (gst_value_serialize (&v) == NULL);
g_value_unset (&v);
}
len = 0;
t = s;
if (!s)
- return g_strdup ("");
+ return NULL;
while (*t) {
if (GST_ASCII_IS_STRING (*t)) {
len++;
"\nserialized : %s\ndeserialized: %s", try[i],
g_value_get_string (&v));
}
+ /* NULL strings should not be serializable */
+ g_value_set_string (&v, NULL);
+ fail_unless (gst_value_serialize (&v) == NULL);
g_value_unset (&v);
}