[gobject-introspection/ebassi/property-annotation: 8/9] tests: Add a Regress test for the property accessors annotations




commit d688c51373ba9504f986df593cf1a238e0d93c6d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jun 17 14:16:32 2021 +0100

    tests: Add a Regress test for the property accessors annotations

 tests/scanner/Regress-1.0-expected.gir | 6 +++++-
 tests/scanner/regress.c                | 8 ++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 9ca8b352..7e8c6084 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -4766,7 +4766,11 @@ raise an error.</doc>
           <type name="utf8"/>
         </array>
       </property>
-      <property name="string" writable="1" transfer-ownership="none">
+      <property name="string"
+                writable="1"
+                transfer-ownership="none"
+                setter="regress_test_obj_set_string"
+                getter="regress_test_obj_get_string">
         <type name="utf8" c:type="gchar*"/>
       </property>
       <property name="write-only"
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index b8e07a9d..10247fdb 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -2690,7 +2690,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
 
 
   /**
-   * TestObj:int:
+   * RegressTestObj:int:
    */
   pspec = g_param_spec_int ("int",
                             "int property",
@@ -2704,7 +2704,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:float:
+   * RegressTestObj:float:
    */
   pspec = g_param_spec_float ("float",
                               "float property",
@@ -2718,7 +2718,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:double:
+   * RegressTestObj:double:
    */
   pspec = g_param_spec_double ("double",
                                "double property",
@@ -2732,7 +2732,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:string:
+   * RegressTestObj:string: (setter regress_test_obj_set_string) (getter regress_test_obj_get_string)
    */
   pspec = g_param_spec_string ("string",
                                "string property",


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