diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2018-05-25 21:35:47 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2018-06-20 18:34:44 -0700 |
commit | ecf5b9ddb7a38b4bd44ce5c8678604145d906536 (patch) | |
tree | b5d3c46b463861d79527a47f119c64604f2404f8 /tests | |
parent | 9ffda061e6726c5668a01a25a49b0c06c71c0453 (diff) | |
download | gobject-introspection-ecf5b9ddb7a38b4bd44ce5c8678604145d906536.tar.gz |
gimarshallingtests: Add test readonly property
As far as I can tell there isn't one of these yet. It's a readonly int
property whose value is always 42.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gimarshallingtests.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 92c181a4..0ddaed71 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -5356,6 +5356,7 @@ enum SOME_FLAGS_PROPERTY, SOME_ENUM_PROPERTY, SOME_BYTE_ARRAY_PROPERTY, + SOME_READONLY_PROPERTY, }; G_DEFINE_TYPE (GIMarshallingTestsPropertiesObject, gi_marshalling_tests_properties_object, G_TYPE_OBJECT); @@ -5451,6 +5452,9 @@ gi_marshalling_tests_properties_object_get_property (GObject *object, case SOME_BYTE_ARRAY_PROPERTY: g_value_set_boxed (value, self->some_byte_array); break; + case SOME_READONLY_PROPERTY: + g_value_set_int (value, 42); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -5698,6 +5702,13 @@ static void gi_marshalling_tests_properties_object_class_init (GIMarshallingTest "some-byte-array", G_TYPE_BYTE_ARRAY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (object_class, SOME_READONLY_PROPERTY, + g_param_spec_int ("some-readonly", + "some-readonly", + "some-readonly", + G_MININT, G_MAXINT, 0, + G_PARAM_READABLE)); } GIMarshallingTestsPropertiesObject * |