[gobject-introspection] Remove Regress tests with input args with transfer full or container.



commit daca45a94ec70a30497a43eb1be18ed6d24ee3df
Author: Pavel Holejsovsky <pavel holejsovsky gmail com>
Date:   Tue Sep 28 07:36:32 2010 +0200

    Remove Regress tests with input args with transfer full or container.
    
    Declaring input parameters with transfer other than none is
    discouraged, so don't do it in the testsuite.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630788

 tests/scanner/Regress-1.0-expected.gir |  132 --------------------------------
 tests/scanner/regress.c                |  117 ----------------------------
 tests/scanner/regress.h                |   11 ---
 3 files changed, 0 insertions(+), 260 deletions(-)
---
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 45958c6..bf71521 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -1134,23 +1134,6 @@ TpAccount::status-changed</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_array_int_in_take"
-              c:identifier="regress_test_array_int_in_take">
-      <return-value transfer-ownership="none">
-        <type name="gint" c:type="int"/>
-      </return-value>
-      <parameters>
-        <parameter name="n_ints" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="ints" transfer-ownership="full">
-          <doc xml:whitespace="preserve">List of ints</doc>
-          <array length="0" c:type="int*">
-            <type name="gint"/>
-          </array>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_array_int_inout"
               c:identifier="regress_test_array_int_inout">
       <return-value transfer-ownership="none">
@@ -1515,20 +1498,6 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_ghash_container_in"
-              c:identifier="regress_test_ghash_container_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="container">
-          <type name="GLib.HashTable" c:type="GHashTable*">
-            <type name="utf8"/>
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_ghash_container_return"
               c:identifier="regress_test_ghash_container_return">
       <return-value transfer-ownership="container">
@@ -1660,19 +1629,6 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_glist_container_in"
-              c:identifier="regress_test_glist_container_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="container">
-          <type name="GLib.List" c:type="GList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_glist_container_return"
               c:identifier="regress_test_glist_container_return">
       <return-value transfer-ownership="container">
@@ -1681,19 +1637,6 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_glist_everything_in"
-              c:identifier="regress_test_glist_everything_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="full">
-          <type name="GLib.List" c:type="GList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_glist_everything_return"
               c:identifier="regress_test_glist_everything_return">
       <return-value transfer-ownership="full">
@@ -1702,18 +1645,6 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_glist_free" c:identifier="regress_test_glist_free">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="full">
-          <type name="GLib.List" c:type="GList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_glist_nothing_in"
               c:identifier="regress_test_glist_nothing_in">
       <return-value transfer-ownership="none">
@@ -1786,19 +1717,6 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_gslist_container_in"
-              c:identifier="regress_test_gslist_container_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="container">
-          <type name="GLib.SList" c:type="GSList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_gslist_container_return"
               c:identifier="regress_test_gslist_container_return">
       <return-value transfer-ownership="container">
@@ -1807,19 +1725,6 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_gslist_everything_in"
-              c:identifier="regress_test_gslist_everything_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="full">
-          <type name="GLib.SList" c:type="GSList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_gslist_everything_return"
               c:identifier="regress_test_gslist_everything_return">
       <return-value transfer-ownership="full">
@@ -1828,18 +1733,6 @@ call and can be released on return.</doc>
         </type>
       </return-value>
     </function>
-    <function name="test_gslist_free" c:identifier="regress_test_gslist_free">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="full">
-          <type name="GLib.SList" c:type="GSList*">
-            <type name="utf8"/>
-          </type>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_gslist_nothing_in"
               c:identifier="regress_test_gslist_nothing_in">
       <return-value transfer-ownership="none">
@@ -2109,19 +2002,6 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_strv_in_container"
-              c:identifier="regress_test_strv_in_container">
-      <return-value transfer-ownership="none">
-        <type name="gboolean" c:type="gboolean"/>
-      </return-value>
-      <parameters>
-        <parameter name="arr" transfer-ownership="container">
-          <array c:type="char**">
-            <type name="utf8"/>
-          </array>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_strv_in_gvalue"
               c:identifier="regress_test_strv_in_gvalue">
       <return-value transfer-ownership="full">
@@ -2397,18 +2277,6 @@ call and can be released on return.</doc>
         </parameter>
       </parameters>
     </function>
-    <function name="test_utf8_nonconst_in"
-              c:identifier="regress_test_utf8_nonconst_in">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="in" transfer-ownership="full">
-          <doc xml:whitespace="preserve">Accepted argument</doc>
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-      </parameters>
-    </function>
     <function name="test_utf8_nonconst_return"
               c:identifier="regress_test_utf8_nonconst_return">
       <return-value transfer-ownership="full">
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 1343cf9..a6bac2b 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -349,17 +349,6 @@ regress_test_utf8_nonconst_return (void)
 }
 
 /**
- * regress_test_utf8_nonconst_in:
- * @in: (transfer full): Accepted argument
- */
-void
-regress_test_utf8_nonconst_in (char *in)
-{
-  g_assert (strcmp (in, utf8_nonconst) == 0);
-  g_free(in);
-}
-
-/**
  * regress_test_utf8_const_in:
  *
  */
@@ -614,18 +603,6 @@ regress_test_strv_in (char **arr)
 }
 
 /**
- * regress_test_strv_in_container:
- * @arr: (array zero-terminated=1) (transfer container):
- */
-gboolean
-regress_test_strv_in_container (char **arr)
-{
-  gboolean result = regress_test_strv_in (arr);
-  g_free (arr);
-  return result;
-}
-
-/**
  * regress_test_array_gtype_in:
  * @n_types:
  * @types: (array length=n_types): List of types
@@ -743,21 +720,6 @@ regress_test_array_fixed_size_int_return (void)
 }
 
 /**
- * regress_test_array_int_in_take:
- * @n_ints:
- * @ints: (array length=n_ints) (transfer full): List of ints
- */
-int
-regress_test_array_int_in_take (int n_ints, int *ints)
-{
-  int i, sum = 0;
-  for (i = 0; i < n_ints; i++)
-    sum += ints[i];
-  g_free (ints);
-  return sum;
-}
-
-/**
  * regress_test_strv_out_c:
  *
  * Returns: (transfer none):
@@ -845,17 +807,6 @@ regress_test_sequence_list()
 }
 
 /**
- * regress_test_glist_free:
- * @in: (element-type utf8) (transfer full):
- */
-void
-regress_test_glist_free (GList *in)
-{
-  g_list_foreach (in, (GFunc)g_free, NULL);
-  g_list_free (in);
-}
-
-/**
  * regress_test_glist_nothing_return:
  *
  * Return value: (element-type utf8) (transfer none):
@@ -939,28 +890,6 @@ regress_test_glist_nothing_in2 (GList *in)
 }
 
 /**
- * regress_test_glist_container_in:
- * @in: (element-type utf8) (transfer container):
- */
-void
-regress_test_glist_container_in (GList *in)
-{
-  regress_assert_test_sequence_list (in);
-  g_list_free (in);
-}
-
-/**
- * regress_test_glist_everything_in:
- * @in: (element-type utf8) (transfer full):
- */
-void
-regress_test_glist_everything_in (GList *in)
-{
-  regress_assert_test_sequence_list (in);
-  regress_test_glist_free (in);
-}
-
-/**
  * regress_test_glist_null_in:
  * @in: (element-type utf8) (allow-none):
  */
@@ -999,17 +928,6 @@ regress_test_sequence_slist()
 }
 
 /**
- * regress_test_gslist_free:
- * @in: (element-type utf8) (transfer full):
- */
-void
-regress_test_gslist_free (GSList *in)
-{
-  g_slist_foreach (in, (GFunc)g_free, NULL);
-  g_slist_free (in);
-}
-
-/**
  * regress_test_gslist_nothing_return:
  *
  * Return value: (element-type utf8) (transfer none):
@@ -1093,27 +1011,6 @@ regress_test_gslist_nothing_in2 (GSList *in)
 }
 
 /**
- * regress_test_gslist_container_in:
- * @in: (element-type utf8) (transfer container):
- */
-void
-regress_test_gslist_container_in (GSList *in)
-{
-  regress_assert_test_sequence_slist (in);
-  g_slist_free (in);
-}
-
-/**
- * regress_test_gslist_everything_in:
- * @in: (element-type utf8) (transfer full):
- */
-void regress_test_gslist_everything_in (GSList *in)
-{
-  regress_assert_test_sequence_slist (in);
-  regress_test_gslist_free (in);
-}
-
-/**
  * regress_test_gslist_null_in:
  * @in: (element-type utf8) (allow-none):
  */
@@ -1284,20 +1181,6 @@ regress_test_ghash_nothing_in2 (GHashTable *in)
   assert_test_table_ghash (in);
 }
 
-/**
- * regress_test_ghash_container_in:
- * @in: (transfer container) (element-type utf8 utf8):
- */
-void
-regress_test_ghash_container_in (GHashTable *in)
-{
-  assert_test_table_ghash (in);
-  /* be careful and explicitly steal all the elements from the ghash before
-   * freeing it. */
-  g_hash_table_steal_all (in);
-  g_hash_table_destroy (in);
-}
-
 /* Nested collection types */
 
 /**
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index eb69aee..8426a95 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -36,7 +36,6 @@ GType regress_test_gtype (GType in);
 /* utf8 */
 G_CONST_RETURN char *regress_test_utf8_const_return (void);
 char *regress_test_utf8_nonconst_return (void);
-void regress_test_utf8_nonconst_in (char *in);
 void regress_test_utf8_const_in (const char *in);
 void regress_test_utf8_out (char **out);
 void regress_test_utf8_inout (char **inout);
@@ -72,9 +71,6 @@ void regress_test_array_fixed_size_int_out (int **ints);
 int *regress_test_array_fixed_size_int_return (void);
 
 /* transfer tests */
-int regress_test_array_int_in_take (int n_ints, int *ints);
-gboolean regress_test_strv_in_container (char **arr);
-
 int *regress_test_array_int_full_out(int *len);
 int *regress_test_array_int_none_out(int *len);
 void regress_test_array_int_null_in (int *arr, int len);
@@ -88,11 +84,8 @@ GList *regress_test_glist_container_return (void);
 GList *regress_test_glist_everything_return (void);
 void regress_test_glist_nothing_in (const GList *in);
 void regress_test_glist_nothing_in2 (GList *in);
-void regress_test_glist_container_in (GList *in);
-void regress_test_glist_everything_in (GList *in);
 void regress_test_glist_null_in(GSList *in);
 void regress_test_glist_null_out(GSList **out_list);
-void regress_test_glist_free (GList *in);
 
 /* GSList */
 G_CONST_RETURN GSList *regress_test_gslist_nothing_return (void);
@@ -101,11 +94,8 @@ GSList *regress_test_gslist_container_return (void);
 GSList *regress_test_gslist_everything_return (void);
 void regress_test_gslist_nothing_in (const GSList *in);
 void regress_test_gslist_nothing_in2 (GSList *in);
-void regress_test_gslist_container_in (GSList *in);
-void regress_test_gslist_everything_in (GSList *in);
 void regress_test_gslist_null_in(GSList *in);
 void regress_test_gslist_null_out(GSList **out_list);
-void regress_test_gslist_free (GSList *in);
 
 /* GHashTable */
 G_CONST_RETURN GHashTable *regress_test_ghash_null_return (void);
@@ -117,7 +107,6 @@ void regress_test_ghash_null_in (const GHashTable *in);
 void regress_test_ghash_null_out (const GHashTable **out);
 void regress_test_ghash_nothing_in (const GHashTable *in);
 void regress_test_ghash_nothing_in2 (GHashTable *in);
-void regress_test_ghash_container_in (GHashTable *in);
 GHashTable *regress_test_ghash_nested_everything_return (void);
 GHashTable *regress_test_ghash_nested_everything_return2 (void);
 



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