From e39804f388e98992c0c5aaaa6de1295b08d6f7db Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 16 Jun 2021 19:27:18 +0100 Subject: tests: Check new property accessors annotations Add an accessors pair to Regress.TestObj and annotate them. --- .../Regress.TestObj.get_string.page | 38 ++ .../Regress.TestObj.set_string.page | 47 ++ .../Regress.TestObj.get_string.page | 32 ++ .../Regress.TestObj.set_string.page | 36 ++ .../Regress.TestObj.get_string.page | 41 ++ .../Regress.TestObj.set_string.page | 45 ++ tests/scanner/Regress-1.0-expected.gir | 579 +++++++++++---------- tests/scanner/Regress-1.0-sections-expected.txt | 2 + tests/scanner/regress.c | 28 + tests/scanner/regress.h | 6 + 10 files changed, 579 insertions(+), 275 deletions(-) create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page create mode 100644 tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page create mode 100644 tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page create mode 100644 tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page new file mode 100644 index 00000000..d4160bf2 --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page @@ -0,0 +1,38 @@ + + + + + + + const char* + + regress_test_obj_get_string + + RegressTestObj* + obj + + + + regress_test_obj_get_string + +const char* regress_test_obj_get_string (RegressTestObj* obj); + + + + + +<code>obj</code> + + + +<code>Returns</code> + + + + + diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page new file mode 100644 index 00000000..62b3657e --- /dev/null +++ b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page @@ -0,0 +1,47 @@ + + + + + + + void + + regress_test_obj_set_string + + RegressTestObj* + obj + + + const char* + str + + + + regress_test_obj_set_string + +void regress_test_obj_set_string (RegressTestObj* obj, + const char* str); + + + + + +<code>obj</code> + + + +<code>str</code> + + + +<code>Returns</code> + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page new file mode 100644 index 00000000..3154a66b --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page @@ -0,0 +1,32 @@ + + + + + + + String + + regress_test_obj_get_string + + + Regress.TestObj.prototype.get_string + +function get_string(): String { + // Gjs wrapper for regress_test_obj_get_string() +} + + + + + +<code>Returns</code> + + + + + diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page new file mode 100644 index 00000000..6d063c60 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page @@ -0,0 +1,36 @@ + + + + + + + void + + regress_test_obj_set_string + + String + str + + + + Regress.TestObj.prototype.set_string + +function set_string(str: String): void { + // Gjs wrapper for regress_test_obj_set_string() +} + + + + + +<code>str</code> + + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page new file mode 100644 index 00000000..b5e22708 --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page @@ -0,0 +1,41 @@ + + + + + + + unicode + + regress_test_obj_get_string + + Regress.TestObj + self + + + + Regress.TestObj.get_string + +@accepts(Regress.TestObj) +@returns(unicode) +def get_string(self): + # Python wrapper for regress_test_obj_get_string() + + + + + +<code>self</code> + + + +<code>Returns</code> +{formatter.format(node, node.retval.doc)} + + + + diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page new file mode 100644 index 00000000..b48972fb --- /dev/null +++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page @@ -0,0 +1,45 @@ + + + + + + + none + + regress_test_obj_set_string + + Regress.TestObj + self + + + unicode + str + + + + Regress.TestObj.set_string + +@accepts(Regress.TestObj, unicode) +@returns(none) +def set_string(self, str): + # Python wrapper for regress_test_obj_set_string() + + + + + +<code>self</code> + + + +<code>str</code> + + + + + diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index e0f02521..0e7142ad 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -18,8 +18,8 @@ and/or use gtk-doc annotations. --> Typedef TestBoxed to test caller-allocates correctness - + line="1394">Typedef TestBoxed to test caller-allocates correctness + @@ -33,15 +33,15 @@ and/or use gtk-doc annotations. --> Compatibility typedef, like telepathy-glib's TpIntSet - + line="1364">Compatibility typedef, like telepathy-glib's TpIntSet + Typedef'd GPtrArray for some reason - + line="1372">Typedef'd GPtrArray for some reason + @@ -51,8 +51,8 @@ and/or use gtk-doc annotations. --> Typedef'd va_list for additional reasons - + line="1383">Typedef'd va_list for additional reasons + - + - + - + - + - + @@ -2602,13 +2602,13 @@ exposed to language bindings. - + - + Like telepathy-glib's TpIntset. - + line="1356">Like telepathy-glib's TpIntset. + - + - + @@ -2661,7 +2661,7 @@ exposed to language bindings. - + @@ -2669,7 +2669,7 @@ exposed to language bindings. - + @@ -2686,13 +2686,13 @@ exposed to language bindings. - + - + introspectable="0"> This should be skipped, and moreover, all function which + line="1338">This should be skipped, and moreover, all function which use it should be. - + @@ -2731,7 +2731,7 @@ use it should be. - + @@ -2740,7 +2740,7 @@ use it should be. - + @@ -2749,7 +2749,7 @@ use it should be. - + @@ -2758,7 +2758,7 @@ use it should be. - + @@ -2767,7 +2767,7 @@ use it should be. - + @@ -2776,7 +2776,7 @@ use it should be. - + @@ -2785,7 +2785,7 @@ use it should be. - + @@ -2794,7 +2794,7 @@ use it should be. - + @@ -2803,7 +2803,7 @@ use it should be. - + @@ -2812,7 +2812,7 @@ use it should be. - + @@ -2821,7 +2821,7 @@ use it should be. - + @@ -2830,7 +2830,7 @@ use it should be. - + @@ -2839,7 +2839,7 @@ use it should be. - + @@ -2857,7 +2857,7 @@ use it should be. - + @@ -2866,7 +2866,7 @@ use it should be. - + @@ -2893,7 +2893,7 @@ use it should be. - + @@ -2902,7 +2902,7 @@ use it should be. - + @@ -2911,7 +2911,7 @@ use it should be. - + @@ -2920,7 +2920,7 @@ use it should be. - + @@ -2929,7 +2929,7 @@ use it should be. - + @@ -3180,13 +3180,13 @@ use it should be. - + - + @@ -3211,7 +3211,7 @@ use it should be. - + @@ -3233,7 +3233,7 @@ use it should be. - + @@ -3241,25 +3241,25 @@ use it should be. the investment rate + line="1109">the investment rate how much money + line="1110">how much money Path to file + line="1111">Path to file - + @@ -3271,7 +3271,7 @@ use it should be. - + @@ -3279,7 +3279,7 @@ use it should be. a hash table; will be modified + line="1098">a hash table; will be modified @@ -3289,7 +3289,7 @@ use it should be. - + @@ -3297,20 +3297,20 @@ use it should be. GError instance; must be freed by the callback + line="1104">GError instance; must be freed by the callback - + - + @@ -3492,13 +3492,13 @@ use it should be. glib:type-name="RegressTestFloating" glib:get-type="regress_test_floating_get_type" glib:type-struct="TestFloatingClass"> - + - + A new floating #RegressTestFloating + line="4311">A new floating #RegressTestFloating @@ -3509,7 +3509,7 @@ use it should be. - + @@ -3527,9 +3527,9 @@ use it should be. glib:unref-func="regress_test_fundamental_object_unref" glib:set-value-func="regress_test_value_set_fundamental_object" glib:get-value-func="regress_test_value_get_fundamental_object"> - + - + @@ -3542,7 +3542,7 @@ use it should be. - + @@ -3554,11 +3554,11 @@ use it should be. - + A new #RegressTestFundamentalObject + line="3428">A new #RegressTestFundamentalObject @@ -3572,7 +3572,7 @@ use it should be. - + @@ -3597,7 +3597,7 @@ use it should be. - + @@ -3612,7 +3612,7 @@ use it should be. - + @@ -3626,7 +3626,7 @@ use it should be. - + @@ -3645,10 +3645,10 @@ use it should be. glib:get-type="regress_test_fundamental_sub_object_get_type" glib:type-struct="TestFundamentalSubObjectClass" glib:fundamental="1"> - + - + @@ -3670,7 +3670,7 @@ use it should be. - + @@ -3794,10 +3794,10 @@ use it should be. glib:type-name="RegressTestInterface" glib:get-type="regress_test_interface_get_type" glib:type-struct="TestInterfaceIface"> - + - + @@ -3805,7 +3805,7 @@ use it should be. the object to emit the signal + line="4170">the object to emit the signal @@ -3824,7 +3824,7 @@ use it should be. the code must look up the signal with + line="4151">the code must look up the signal with g_interface_info_find_signal() in order to get this to work. @@ -3834,13 +3834,13 @@ use it should be. - + - + @@ -3875,7 +3875,7 @@ use it should be. - + @@ -3913,7 +3913,7 @@ use it should be. - + @@ -3926,14 +3926,14 @@ use it should be. allow-none="1"> A #RegressTestObj + line="3247">A #RegressTestObj - + @@ -3945,7 +3945,7 @@ use it should be. - + @@ -3996,7 +3996,7 @@ use it should be. This method is virtual. Notably its name differs from the virtual + line="3221">This method is virtual. Notably its name differs from the virtual slot name, which makes it useful for testing bindings handle this case. @@ -4007,13 +4007,13 @@ case. A #RegressTestObj + line="3223">A #RegressTestObj Meaningless string + line="3224">Meaningless string @@ -4021,10 +4021,10 @@ case. This method is virtual. Notably its name differs from the virtual + line="3221">This method is virtual. Notably its name differs from the virtual slot name, which makes it useful for testing bindings handle this case. - + @@ -4032,20 +4032,20 @@ case. A #RegressTestObj + line="3223">A #RegressTestObj Meaningless string + line="3224">Meaningless string - + @@ -4057,7 +4057,7 @@ case. - + @@ -4065,14 +4065,14 @@ case. The object to emit the signal. + line="2942">The object to emit the signal. - + @@ -4086,8 +4086,8 @@ case. c:identifier="regress_test_obj_emit_sig_with_inout_int"> The signal handler must increment the inout parameter by 1. - + line="2926">The signal handler must increment the inout parameter by 1. + @@ -4095,14 +4095,14 @@ case. The object to emit the signal. + line="2928">The object to emit the signal. - + @@ -4114,7 +4114,7 @@ case. - + @@ -4122,14 +4122,14 @@ case. The object to emit the signal. + line="2955">The object to emit the signal. - + @@ -4141,7 +4141,7 @@ case. - + @@ -4152,7 +4152,7 @@ case. - + @@ -4160,14 +4160,27 @@ case. A #RegressTestObj + line="2988">A #RegressTestObj + + + + + + + + + + + - + @@ -4179,7 +4192,7 @@ case. - + @@ -4198,7 +4211,7 @@ case. - + @@ -4210,7 +4223,7 @@ case. - + @@ -4218,14 +4231,14 @@ case. A #RegressTestObj + line="3291">A #RegressTestObj - + @@ -4233,13 +4246,13 @@ case. A #RegressTestObj + line="3278">A #RegressTestObj some uint8 array + line="3279">some uint8 array @@ -4247,14 +4260,14 @@ case. length of @input + line="3280">length of @input - + @@ -4262,13 +4275,13 @@ case. A #RegressTestObj + line="3267">A #RegressTestObj some #GObject + line="3268">some #GObject @@ -4290,30 +4303,46 @@ case. + + + + + + + + + + + + + + Check that the out value is skipped - + line="3185">Check that the out value is skipped + %TRUE if the call succeeds, %FALSE if @error is set. + line="3199">%TRUE if the call succeeds, %FALSE if @error is set. A #RegressTestObj. + line="3187">A #RegressTestObj. Parameter. + line="3188">Parameter. transfer-ownership="full"> Return value. + line="3189">Return value. Other parameter. + line="3190">Other parameter. skip="1"> Will be incremented. + line="3191">Will be incremented. transfer-ownership="full"> Return value. + line="3192">Return value. Number. + line="3193">Number. Number. + line="3194">Number. @@ -4369,25 +4398,25 @@ case. throws="1"> Check that the out value is skipped - + line="3149">Check that the out value is skipped + %TRUE if the call succeeds, %FALSE if @error is set. + line="3163">%TRUE if the call succeeds, %FALSE if @error is set. A #RegressTestObj. + line="3151">A #RegressTestObj. Parameter. + line="3152">Parameter. skip="1"> Return value. + line="3153">Return value. Other parameter. + line="3154">Other parameter. transfer-ownership="full"> Will be incremented. + line="3155">Will be incremented. transfer-ownership="full"> Return value. + line="3156">Return value. Number. + line="3157">Number. Number. + line="3158">Number. @@ -4443,25 +4472,25 @@ case. throws="1"> Check that a parameter is skipped - + line="3113">Check that a parameter is skipped + %TRUE if the call succeeds, %FALSE if @error is set. + line="3127">%TRUE if the call succeeds, %FALSE if @error is set. A #RegressTestObj. + line="3115">A #RegressTestObj. Parameter. + line="3116">Parameter. transfer-ownership="full"> Return value. + line="3117">Return value. Other parameter. + line="3118">Other parameter. transfer-ownership="full"> Will be incremented. + line="3119">Will be incremented. transfer-ownership="full"> Return value. + line="3120">Return value. Number. + line="3121">Number. Number. + line="3122">Number. @@ -4516,25 +4545,25 @@ case. throws="1"> Check that the return value is skipped - + line="3053">Check that the return value is skipped + %TRUE if the call succeeds, %FALSE if @error is set. + line="3067">%TRUE if the call succeeds, %FALSE if @error is set. a #RegressTestObj + line="3055">a #RegressTestObj Parameter. + line="3056">Parameter. transfer-ownership="full"> A return value. + line="3057">A return value. Other parameter. + line="3058">Other parameter. transfer-ownership="full"> Will be incremented. + line="3059">Will be incremented. transfer-ownership="full"> Return value. + line="3060">Return value. Number. + line="3061">Number. Number. + line="3062">Number. @@ -4589,33 +4618,33 @@ case. throws="1"> Check that the return value is skipped. Succeed if a is nonzero, otherwise + line="3089">Check that the return value is skipped. Succeed if a is nonzero, otherwise raise an error. - + %TRUE if the call succeeds, %FALSE if @error is set. + line="3098">%TRUE if the call succeeds, %FALSE if @error is set. a #RegressTestObj + line="3091">a #RegressTestObj Parameter. + line="3092">Parameter. - + @@ -4623,7 +4652,7 @@ raise an error. A #RegressTestObj + line="2998">A #RegressTestObj @@ -4660,8 +4689,8 @@ raise an error. throws="1"> This function throws an error if m is odd. - + line="3021">This function throws an error if m is odd. + @@ -4669,7 +4698,7 @@ raise an error. A #RegressTestObj + line="3023">A #RegressTestObj @@ -5087,13 +5116,13 @@ the introspection client langage. A #RegressTestObj + line="3223">A #RegressTestObj Meaningless string + line="3224">Meaningless string @@ -5179,7 +5208,7 @@ the introspection client langage. - + @@ -5190,7 +5219,7 @@ the introspection client langage. - + @@ -5202,7 +5231,7 @@ the introspection client langage. - + @@ -5302,7 +5331,7 @@ the introspection client langage. - + @@ -5509,7 +5538,7 @@ the introspection client langage. - + @@ -5519,7 +5548,7 @@ the introspection client langage. - + @@ -5538,17 +5567,17 @@ the introspection client langage. glib:type-name="RegressTestSubObj" glib:get-type="regress_test_sub_obj_get_type" glib:type-struct="TestSubObjClass"> - + - + - + @@ -5559,7 +5588,7 @@ the introspection client langage. - + @@ -5588,7 +5617,7 @@ the introspection client langage. - + @@ -5600,16 +5629,16 @@ the introspection client langage. glib:type-name="RegressTestWi8021x" glib:get-type="regress_test_wi_802_1x_get_type" glib:type-struct="TestWi8021xClass"> - + - + - + @@ -5621,7 +5650,7 @@ the introspection client langage. - + @@ -5633,7 +5662,7 @@ the introspection client langage. - + @@ -5659,7 +5688,7 @@ the introspection client langage. - + @@ -5667,12 +5696,12 @@ the introspection client langage. - + - + @@ -6329,7 +6358,7 @@ exposed to language bindings. - + @@ -6340,14 +6369,14 @@ exposed to language bindings. allow-none="1"> A #RegressTestObj + line="3238">A #RegressTestObj - + @@ -6358,17 +6387,17 @@ exposed to language bindings. allow-none="1"> A #RegressTestObj + line="3258">A #RegressTestObj - + A new variant + line="4587">A new variant @@ -6394,9 +6423,9 @@ exposed to language bindings. c:identifier="regress_has_parameter_named_attrs"> This test case mirrors GnomeKeyringPasswordSchema from + line="4547">This test case mirrors GnomeKeyringPasswordSchema from libgnome-keyring. - + @@ -6404,13 +6433,13 @@ libgnome-keyring. some int + line="4549">some int list of attributes + line="4550">list of attributes @@ -6419,7 +6448,7 @@ libgnome-keyring. - + @@ -6432,7 +6461,7 @@ libgnome-keyring. - + @@ -6445,7 +6474,7 @@ libgnome-keyring. - + @@ -6488,7 +6517,7 @@ in particular, but it should be serialized in the gir nevertheless. - + @@ -6500,7 +6529,7 @@ in particular, but it should be serialized in the gir nevertheless. - + @@ -6511,7 +6540,7 @@ in particular, but it should be serialized in the gir nevertheless. transfer-ownership="full"> An array of #RegressTestObj + line="3300">An array of #RegressTestObj @@ -6675,7 +6704,7 @@ in particular, but it should be serialized in the gir nevertheless. - + @@ -6863,7 +6892,7 @@ in particular, but it should be serialized in the gir nevertheless. - + @@ -6882,12 +6911,12 @@ in particular, but it should be serialized in the gir nevertheless. c:identifier="regress_test_array_struct_in_full"> Test flat array input with transfer full. + line="4679">Test flat array input with transfer full. Similar to: - gsf_property_settings_free() with structs but they contain pointers - g_byte_array_new_take() with guint8s - + @@ -6895,7 +6924,7 @@ Similar to: An array + line="4681">An array @@ -6903,7 +6932,7 @@ Similar to: Length of @arr + line="4682">Length of @arr @@ -6912,10 +6941,10 @@ Similar to: c:identifier="regress_test_array_struct_in_none"> Test flat array input with transfer none. + line="4699">Test flat array input with transfer none. Similar to g_main_context_check() or gtk_target_list_new(). - + @@ -6923,7 +6952,7 @@ Similar to g_main_context_check() or gtk_target_list_new(). An array. + line="4701">An array. @@ -6931,7 +6960,7 @@ Similar to g_main_context_check() or gtk_target_list_new(). Length of @arr + line="4702">Length of @arr @@ -6966,10 +6995,10 @@ Similar to g_main_context_check() or gtk_target_list_new(). c:identifier="regress_test_array_struct_out_caller_alloc"> Test flat caller-allocated array output. + line="4658">Test flat caller-allocated array output. Similar to g_main_context_query(). - + @@ -6980,7 +7009,7 @@ Similar to g_main_context_query(). transfer-ownership="none"> An array + line="4660">An array @@ -6991,7 +7020,7 @@ Similar to g_main_context_query(). transfer-ownership="full"> Length of @arr + line="4661">Length of @arr @@ -7000,10 +7029,10 @@ Similar to g_main_context_query(). c:identifier="regress_test_array_struct_out_container"> Test flat array output with transfer container. + line="4620">Test flat array output with transfer container. Similar to pango_layout_get_log_attrs(). - + @@ -7014,7 +7043,7 @@ Similar to pango_layout_get_log_attrs(). transfer-ownership="container"> An array + line="4622">An array @@ -7025,7 +7054,7 @@ Similar to pango_layout_get_log_attrs(). transfer-ownership="full"> Length of @arr + line="4623">Length of @arr @@ -7034,8 +7063,8 @@ Similar to pango_layout_get_log_attrs(). c:identifier="regress_test_array_struct_out_full_fixed"> Test flat fixed-size array output with transfer full. - + line="4642">Test flat fixed-size array output with transfer full. + @@ -7046,7 +7075,7 @@ Similar to pango_layout_get_log_attrs(). transfer-ownership="full"> An array + line="4644">An array @@ -7059,13 +7088,13 @@ Similar to pango_layout_get_log_attrs(). c:identifier="regress_test_array_struct_out_none"> Test flat array output with transfer none. + line="4595">Test flat array output with transfer none. Similar to: - mm_modem_peek_ports() with structs - gdk_query_visual_types() with enums - gdk_event_get_axes() with doubles - + @@ -7076,7 +7105,7 @@ Similar to: transfer-ownership="none"> An array + line="4597">An array @@ -7087,14 +7116,14 @@ Similar to: transfer-ownership="full"> Length of @arr + line="4598">Length of @arr - + @@ -7223,7 +7252,7 @@ Similar to: - + @@ -7239,7 +7268,7 @@ Similar to: - + @@ -7263,9 +7292,9 @@ Similar to: c:identifier="regress_test_callback_destroy_notify"> Notified - callback persists until a DestroyNotify delegate + line="3901">Notified - callback persists until a DestroyNotify delegate is invoked. - + @@ -7293,9 +7322,9 @@ is invoked. c:identifier="regress_test_callback_destroy_notify_no_user_data"> Adds a scope notified callback with no user data. This can invoke an error + line="3928">Adds a scope notified callback with no user data. This can invoke an error condition in bindings which needs to be tested. - + @@ -7314,7 +7343,7 @@ condition in bindings which needs to be tested. - + @@ -7327,7 +7356,7 @@ condition in bindings which needs to be tested. - + @@ -7336,14 +7365,14 @@ condition in bindings which needs to be tested. c:identifier="regress_test_callback_thaw_notifications"> Invokes all callbacks installed by #test_callback_destroy_notify(), + line="3942">Invokes all callbacks installed by #test_callback_destroy_notify(), adding up their return values, and removes them, invoking the corresponding destroy notfications. - + Sum of the return values of the invoked callbacks. + line="3949">Sum of the return values of the invoked callbacks. @@ -7351,9 +7380,9 @@ corresponding destroy notfications. c:identifier="regress_test_callback_user_data"> Call - callback parameter persists for the duration of the method + line="3870">Call - callback parameter persists for the duration of the method call and can be released on return. - + @@ -7425,7 +7454,7 @@ call and can be released on return. - + @@ -7433,7 +7462,7 @@ call and can be released on return. - + @@ -7518,7 +7547,7 @@ call and can be released on return. - + @@ -7981,7 +8010,7 @@ element-type annotation. - + @@ -7989,7 +8018,7 @@ element-type annotation. GHashTable that gets passed to callback + line="4073">GHashTable that gets passed to callback @@ -8099,7 +8128,7 @@ element-type annotation. - + @@ -8141,14 +8170,14 @@ element-type annotation. c:identifier="regress_test_multiline_doc_comments"> This is a function. + line="4455">This is a function. It has multiple lines in the documentation. The sky is blue. You will give me your credit card number. - + @@ -8157,7 +8186,7 @@ You will give me your credit card number. c:identifier="regress_test_nested_parameter"> <informaltable> + line="4471"><informaltable> <tgroup cols="3"> <thead> <row> @@ -8185,7 +8214,7 @@ rgb(20%, 30%, 0%)</literallayout></entry> </informaltable> What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -8193,14 +8222,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML. An integer + line="4473">An integer - + @@ -8216,7 +8245,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -8228,14 +8257,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + - + @@ -8281,7 +8310,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML. - + @@ -8311,9 +8340,9 @@ What we're testing here is that the scanner ignores the @a nested inside XML. Should not emit a warning: + line="4123">Should not emit a warning: https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8321,7 +8350,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 No annotation here + line="4125">No annotation here @@ -8377,7 +8406,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8436,7 +8465,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8475,8 +8504,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 throws="1"> This function throws an error if m is odd. - + line="4343">This function throws an error if m is odd. + @@ -8512,7 +8541,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8813,7 +8842,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + @@ -8845,7 +8874,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399 - + diff --git a/tests/scanner/Regress-1.0-sections-expected.txt b/tests/scanner/Regress-1.0-sections-expected.txt index a5d8f64d..36cb4c69 100644 --- a/tests/scanner/Regress-1.0-sections-expected.txt +++ b/tests/scanner/Regress-1.0-sections-expected.txt @@ -355,6 +355,7 @@ regress_test_obj_emit_sig_with_null_error regress_test_obj_emit_sig_with_obj regress_test_obj_emit_sig_with_uint64 regress_forced_method +regress_test_obj_get_string regress_test_obj_instance_method regress_test_obj_instance_method_callback regress_test_obj_instance_method_full @@ -362,6 +363,7 @@ regress_test_obj_name_conflict regress_test_obj_not_nullable_element_typed_gpointer_in regress_test_obj_not_nullable_typed_gpointer_in regress_test_obj_set_bare +regress_test_obj_set_string regress_test_obj_skip_inout_param regress_test_obj_skip_out_param regress_test_obj_skip_param diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index 3a63436b..b8e07a9d 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -2846,6 +2846,34 @@ regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare) g_object_ref (obj->bare); } +/** + * regress_test_obj_set_string: (set-property string) + * @obj: + * @str: + */ +void +regress_test_obj_set_string (RegressTestObj *obj, const char *str) +{ + if (g_strcmp0 (str, obj->string) == 0) + return; + + g_free (obj->string); + obj->string = g_strdup (str); + g_object_notify (G_OBJECT (obj), "string"); +} + +/** + * regress_test_obj_get_string: (get-property string) + * @obj: + * + * Returns: (transfer none): + */ +const char * +regress_test_obj_get_string (RegressTestObj *obj) +{ + return obj->string; +} + void regress_test_obj_emit_sig_with_obj (RegressTestObj *obj) { diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index 0b239f14..68ab0628 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -827,6 +827,12 @@ RegressTestObj* regress_test_obj_new_from_file (const char *x, GError **error) _GI_TEST_EXTERN void regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare); +_GI_TEST_EXTERN +void regress_test_obj_set_string (RegressTestObj *obj, const char *str); + +_GI_TEST_EXTERN +const char *regress_test_obj_get_string (RegressTestObj *obj); + _GI_TEST_EXTERN void regress_test_obj_emit_sig_with_obj (RegressTestObj *obj); -- cgit v1.2.1