summaryrefslogtreecommitdiff
path: root/tests/scanner/regress.c
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2016-01-02 00:17:59 +0100
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2017-01-14 12:55:51 +0000
commitceddab4d6f0f65d773f361863ca3022b67b192bd (patch)
tree7a8db60a7c5c7af5de256350e9e8d9c11fd66d78 /tests/scanner/regress.c
parent4bcad96c5a3f1ab17187e264e0e550fab56a29dc (diff)
downloadgobject-introspection-ceddab4d6f0f65d773f361863ca3022b67b192bd.tar.gz
tests: Add a hidden fundamental class
We could have a fundamental type A derived by a subclass B. Class A happens to be introspected, but B isn't. This can cause some issues in Gjs. https://bugzilla.gnome.org/show_bug.cgi?id=760056
Diffstat (limited to 'tests/scanner/regress.c')
-rw-r--r--tests/scanner/regress.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index c317682a..638587e3 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3442,6 +3442,43 @@ regress_test_fundamental_sub_object_new (const char * data)
return object;
}
+/**/
+
+#define regress_test_fundamental_hidden_sub_object_get_type \
+ _regress_test_fundamental_hidden_sub_object_get_type
+
+typedef struct _RegressTestFundamentalHiddenSubObject RegressTestFundamentalHiddenSubObject;
+typedef struct _GObjectClass RegressTestFundamentalHiddenSubObjectClass;
+struct _RegressTestFundamentalHiddenSubObject {
+ RegressTestFundamentalObject parent_instance;
+};
+
+G_DEFINE_TYPE (RegressTestFundamentalHiddenSubObject,
+ regress_test_fundamental_hidden_sub_object,
+ REGRESS_TEST_TYPE_FUNDAMENTAL_OBJECT);
+
+static void
+regress_test_fundamental_hidden_sub_object_init (RegressTestFundamentalHiddenSubObject *object)
+{
+}
+
+static void
+regress_test_fundamental_hidden_sub_object_class_init (RegressTestFundamentalHiddenSubObjectClass *klass)
+{
+}
+
+/**
+ * regress_test_create_fundamental_hidden_class_instance:
+ *
+ * Return value: (transfer full):
+ */
+RegressTestFundamentalObject *
+regress_test_create_fundamental_hidden_class_instance (void)
+{
+ return (RegressTestFundamentalObject *) g_type_create_instance (_regress_test_fundamental_hidden_sub_object_get_type());
+}
+
+
/**
* regress_test_callback: