mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
tests: fix generic closure marshalling tests
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
This commit is contained in:
parent
adf7e0740c
commit
a343904596
@ -19,7 +19,7 @@ test_enum_get_type (void)
|
|||||||
|
|
||||||
if (g_once_init_enter (&g_define_type_id__volatile))
|
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_NEGATIVE, "TEST_ENUM_NEGATIVE", "negative" },
|
||||||
{ TEST_ENUM_NONE, "TEST_ENUM_NONE", "none" },
|
{ TEST_ENUM_NONE, "TEST_ENUM_NONE", "none" },
|
||||||
{ TEST_ENUM_FOO, "TEST_ENUM_FOO", "foo" },
|
{ TEST_ENUM_FOO, "TEST_ENUM_FOO", "foo" },
|
||||||
@ -27,7 +27,7 @@ test_enum_get_type (void)
|
|||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
GType g_define_type_id =
|
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);
|
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))
|
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_FOO, "TEST_UNSIGNED_ENUM_FOO", "foo" },
|
||||||
{ TEST_UNSIGNED_ENUM_BAR, "TEST_UNSIGNED_ENUM_BAR", "bar" },
|
{ TEST_UNSIGNED_ENUM_BAR, "TEST_UNSIGNED_ENUM_BAR", "bar" },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
GType g_define_type_id =
|
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);
|
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user