gobject-introspection r737 - in trunk: . tests/repository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r737 - in trunk: . tests/repository
- Date: Thu, 16 Oct 2008 22:19:21 +0000 (UTC)
Author: walters
Date: Thu Oct 16 22:19:21 2008
New Revision: 737
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=737&view=rev
Log:
Bug 556185 - [test for] segfault on g_callable_info_get_return_type
Modified:
trunk/ChangeLog
trunk/tests/repository/Makefile.am
trunk/tests/repository/gitestrepo.c
Modified: trunk/tests/repository/Makefile.am
==============================================================================
--- trunk/tests/repository/Makefile.am (original)
+++ trunk/tests/repository/Makefile.am Thu Oct 16 22:19:21 2008
@@ -9,4 +9,4 @@
gitestrepo_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
TESTS = gitestrepo
-TESTS_ENVIRONMENT=env top_builddir="$(top_builddir)"
\ No newline at end of file
+TESTS_ENVIRONMENT=env top_builddir="$(top_builddir)" $(DEBUG)
\ No newline at end of file
Modified: trunk/tests/repository/gitestrepo.c
==============================================================================
--- trunk/tests/repository/gitestrepo.c (original)
+++ trunk/tests/repository/gitestrepo.c Thu Oct 16 22:19:21 2008
@@ -4,6 +4,33 @@
#include <stdlib.h>
#include <unistd.h>
+void
+test_constructor_return_type(GIBaseInfo* object_info)
+{
+ GIFunctionInfo* constructor;
+ GITypeInfo* return_type;
+ GIBaseInfo *return_info;
+ const gchar* class_name;
+ const gchar* return_name;
+
+ class_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*) object_info);
+ g_assert (class_name);
+
+ constructor = g_object_info_find_method((GIObjectInfo*)object_info, "new");
+ g_assert (constructor);
+
+ return_type = g_callable_info_get_return_type ((GICallableInfo*)constructor);
+ g_assert (return_type);
+ g_assert (g_type_info_get_tag (return_type) == GI_TYPE_TAG_INTERFACE);
+
+ return_info = g_type_info_get_interface (return_type);
+ g_assert (return_info);
+
+ return_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*) return_info);
+ g_assert (strcmp (class_name, return_name) == 0);
+}
+
+
int
main(int argc, char **argv)
{
@@ -38,5 +65,7 @@
g_print ("Successfully found GCancellable\n");
+ test_constructor_return_type (info);
+
exit(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]