tests: fix generic closure marshalling tests
authorDan Williams <dcbw@redhat.com>
Mon, 26 Sep 2011 18:07:51 +0000 (13:07 -0500)
committerDan Williams <dcbw@redhat.com>
Wed, 28 Sep 2011 16:01:39 +0000 (11:01 -0500)
We're testing enums here, not flags, so we need to make sure
we're trying to send enums through the marshalling.

https://bugzilla.gnome.org/show_bug.cgi?id=659881

gobject/tests/signals.c

index f283cd6..864922f 100644 (file)
@@ -19,7 +19,7 @@ test_enum_get_type (void)
 
   if (g_once_init_enter (&g_define_type_id__volatile))
     {
-      static const GFlagsValue values[] = {
+      static const GEnumValue values[] = {
         { TEST_ENUM_NEGATIVE, "TEST_ENUM_NEGATIVE", "negative" },
         { TEST_ENUM_NONE, "TEST_ENUM_NONE", "none" },
         { TEST_ENUM_FOO, "TEST_ENUM_FOO", "foo" },
@@ -27,7 +27,7 @@ test_enum_get_type (void)
         { 0, NULL, NULL }
       };
       GType g_define_type_id =
-        g_flags_register_static (g_intern_static_string ("TestEnum"), values);
+        g_enum_register_static (g_intern_static_string ("TestEnum"), values);
       g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
     }
 
@@ -41,13 +41,13 @@ test_unsigned_enum_get_type (void)
 
   if (g_once_init_enter (&g_define_type_id__volatile))
     {
-      static const GFlagsValue values[] = {
+      static const GEnumValue values[] = {
         { TEST_UNSIGNED_ENUM_FOO, "TEST_UNSIGNED_ENUM_FOO", "foo" },
         { TEST_UNSIGNED_ENUM_BAR, "TEST_UNSIGNED_ENUM_BAR", "bar" },
         { 0, NULL, NULL }
       };
       GType g_define_type_id =
-        g_flags_register_static (g_intern_static_string ("TestUnsignedEnum"), values);
+        g_enum_register_static (g_intern_static_string ("TestUnsignedEnum"), values);
       g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
     }