gobject, tests: add tests for autoptr (and lists) with declared

Add tests using an object declared with G_DECLARE_FINAL_TYPE, that is derived
from another, declared using G_DECLARE_DERIVABLE_TYPE, and that
thus uses _GLIB_DEFINE_AUTOPTR_CHAINUP to define cleanup functions.

And verify that both g_autoptr(Type) and g_auto(s)list(Type) work
This commit is contained in:
Marco Trevisan (Treviño)
2018-10-23 19:43:01 -05:00
parent 86c073dba9
commit 8d42b0246b
3 changed files with 183 additions and 0 deletions

View File

@@ -51,6 +51,10 @@ gobject_tests = {
},
}
if cc.get_id() != 'msvc'
gobject_tests += {'autoptr' : {}}
endif
# FIXME: put common bits of test environment() in one location
# Not entirely random of course, but at least it changes over time
random_number = minor_version + meson.version().split('.').get(1).to_int()