Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Clasen
e80d2bc1ca Add a test for g_type_is_a
Check that the macro and function versions
of g_type_is_a work the same.
2022-05-20 09:08:09 -04:00
Benjamin Otte
98f0a5a7da gtype: Add g_type_interface_instantiatable_prerequisite()
This function returns the most specific instantiatable type
that is a prerequisite for a given interface.

This type is necessary in particular when dealing with GValues
because a GValue contains an instance of a type.

This commit includes tests for the new API.
2020-11-02 17:36:18 +00:00
Benjamin Otte
276e927fd4 Revert last 4 commits
This reverts commits:
  5899c61ed2
  e994d45352
  eb20dec144
  ebec0dd359
which wer accidentally pushed to master instead of a branch
2019-11-26 00:54:15 +01:00
Benjamin Otte
eb20dec144 gtype: Add g_type_interface_instantiable_prerequisite()
There is (at most) a single GType that is instantiable and a
prerequisite for an interface. This function returns that type.

This type is necessary in particular when dealing with GValues because a
GValue contains an instance of a type.
2019-11-25 20:06:39 +01:00
Bastien Nocera
b80fcc6cb8 tests: Remove unneeded ";" in G_DEFINE_INTERFACE_WITH_CODE 2019-07-29 17:28:01 +02:00
Matthias Clasen
a9abbb3192 Improve test coverage in gobject/
Lines:          6631    8862    74.8 %
Functions:      747     893     83.7 %
2013-05-29 08:37:08 -04:00