summaryrefslogtreecommitdiff
path: root/tests/repository
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-10-03 10:03:30 -0400
committerColin Walters <walters@verbum.org>2011-10-03 10:12:23 -0400
commit25fb1964cbf603a457308a3ecb9ed177262763ef (patch)
tree6a1f99385abb0879312e5890da4d5cde46eaa8a2 /tests/repository
parent25a19e13af0c716fde6d35fb0531aeceedb9a9f8 (diff)
downloadgobject-introspection-25fb1964cbf603a457308a3ecb9ed177262763ef.tar.gz
Revert "gitypelibtest: Remove test on TestStructE size"
This reverts commit e17c09749c23edbd928db19a8162484ddb6299b8. We actually want the test for sizeof(GValue). https://bugzilla.gnome.org/show_bug.cgi?id=660338
Diffstat (limited to 'tests/repository')
-rw-r--r--tests/repository/gitypelibtest.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
index b10e6a73..15722a6d 100644
--- a/tests/repository/gitypelibtest.c
+++ b/tests/repository/gitypelibtest.c
@@ -107,6 +107,18 @@ test_enum_and_flags_static_methods(GIRepository *repo)
}
static void
+test_size_of_gvalue(GIRepository *repo)
+{
+ GIBaseInfo *struct_info;
+
+ struct_info = g_irepository_find_by_name (repo, "GObject", "Value");
+ if (!struct_info)
+ g_error ("Could not find GObject.Value");
+ g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue));
+ g_base_info_unref (struct_info);
+}
+
+static void
test_is_pointer_for_struct_arg (GIRepository *repo)
{
GITypelib *ret;
@@ -156,6 +168,7 @@ main(int argc, char **argv)
/* do tests */
test_enum_and_flags_cidentifier (repo);
test_enum_and_flags_static_methods (repo);
+ test_size_of_gvalue (repo);
test_is_pointer_for_struct_arg (repo);
exit(0);