[gobject-introspection] Negative test case for bad (out) case, not setting the *out_val in a (transfer full) case



commit 0fa369b8edfb6d4db990351cb758efd295b6146c
Author: Zach Goldberg <zach zachgoldberg com>
Date:   Tue Apr 20 23:56:44 2010 -0400

    Negative test case for bad (out) case, not setting the *out_val in a (transfer full) case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616358

 gir/gimarshallingtests.c |   14 ++++++++++++++
 gir/gimarshallingtests.h |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gir/gimarshallingtests.c b/gir/gimarshallingtests.c
index cf509a7..4720950 100644
--- a/gir/gimarshallingtests.c
+++ b/gir/gimarshallingtests.c
@@ -1068,6 +1068,20 @@ g_i_marshalling_tests_utf8_full_out (gchar **utf8)
 }
 
 /**
+ * g_i_marshalling_tests_utf8_dangling_out:
+ * utf8: (out) (transfer full):
+ */
+void
+g_i_marshalling_tests_utf8_dangling_out (gchar **utf8)
+{
+    /* Intentionally don't touch the pointer to see how
+       the bindings handle this case.  Bindings should be
+       robust against broken C functions and can initialize 
+       even OUT vlues to NULL.
+    */
+}
+
+/**
  * g_i_marshalling_tests_utf8_none_inout:
  * utf8: (inout) (transfer none):
  */
diff --git a/gir/gimarshallingtests.h b/gir/gimarshallingtests.h
index 678ab36..acdbbba 100644
--- a/gir/gimarshallingtests.h
+++ b/gir/gimarshallingtests.h
@@ -253,6 +253,8 @@ void g_i_marshalling_tests_utf8_full_in (gchar *utf8);
 void g_i_marshalling_tests_utf8_none_out (gchar **utf8);
 void g_i_marshalling_tests_utf8_full_out (gchar **utf8);
 
+void g_i_marshalling_tests_utf8_dangling_out (gchar **utf8);
+
 void g_i_marshalling_tests_utf8_none_inout (gchar **utf8);
 void g_i_marshalling_tests_utf8_full_inout (gchar **utf8);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]