[glib/wip/rishi/gdbus-codegen-deprecated: 2/2] gio/tests/gdbus-test-codegen: Ensure that G_PARAM_DEPRECATED is present
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/rishi/gdbus-codegen-deprecated: 2/2] gio/tests/gdbus-test-codegen: Ensure that G_PARAM_DEPRECATED is present
- Date: Wed, 21 Nov 2018 18:00:34 +0000 (UTC)
commit a7ced0e742ffb0eafcf06f002317bcdb999de854
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Nov 21 16:41:42 2018 +0100
gio/tests/gdbus-test-codegen: Ensure that G_PARAM_DEPRECATED is present
https://gitlab.gnome.org/GNOME/glib/merge_requests/485
gio/tests/gdbus-test-codegen.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
---
diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c
index 918ed784f..794c405f1 100644
--- a/gio/tests/gdbus-test-codegen.c
+++ b/gio/tests/gdbus-test-codegen.c
@@ -2427,6 +2427,28 @@ test_autocleanups (void)
/* ---------------------------------------------------------------------------------------------------- */
+/* deprecations
+ */
+
+static void
+test_deprecations (void)
+{
+ FooiGenOldieInterface *skel;
+ GParamSpec *pspec;
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+ skel = foo_igen_oldie_interface_skeleton_new ();
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skel), "bat");
+ g_assert_nonnull (pspec);
+ g_assert_true ((pspec->flags & G_PARAM_DEPRECATED) != 0);
+
+ g_object_unref (skel);
+}
+
+/* ---------------------------------------------------------------------------------------------------- */
+
int
main (int argc,
char *argv[])
@@ -2438,6 +2460,7 @@ main (int argc,
g_test_add_func ("/gdbus/codegen/object-manager", test_object_manager);
g_test_add_func ("/gdbus/codegen/property-naming", test_property_naming);
g_test_add_func ("/gdbus/codegen/autocleanups", test_autocleanups);
+ g_test_add_func ("/gdbus/codegen/deprecations", test_deprecations);
return session_bus_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]