Skip all LayoutChild when testing

GtkLayoutChild instances are created on demand once we have a widget, a
GtkLayoutManager, and a child widget. This makes testing their creation
fairly tricky.

Let's skip them, for the time being.
This commit is contained in:
Emmanuele Bassi 2019-03-26 18:05:48 +00:00
parent dd5c981b63
commit fc33bf2d1f
3 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,7 @@ test_type (gconstpointer data)
/* These can't be freely constructed/destroyed */ /* These can't be freely constructed/destroyed */
if (g_type_is_a (type, GTK_TYPE_APPLICATION) || if (g_type_is_a (type, GTK_TYPE_APPLICATION) ||
g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) || g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) ||
g_type_is_a (type, GTK_TYPE_LAYOUT_CHILD) ||
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
g_type_is_a (type, GTK_TYPE_PRINT_JOB) || g_type_is_a (type, GTK_TYPE_PRINT_JOB) ||
#endif #endif

View File

@ -370,6 +370,7 @@ test_type (gconstpointer data)
/* These can't be freely constructed/destroyed */ /* These can't be freely constructed/destroyed */
if (g_type_is_a (type, GTK_TYPE_APPLICATION) || if (g_type_is_a (type, GTK_TYPE_APPLICATION) ||
g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) || g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) ||
g_type_is_a (type, GTK_TYPE_LAYOUT_CHILD) ||
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
g_type_is_a (type, GTK_TYPE_PRINT_JOB) || g_type_is_a (type, GTK_TYPE_PRINT_JOB) ||
#endif #endif

View File

@ -72,6 +72,11 @@ test_finalize_object (gconstpointer data)
NULL); NULL);
g_object_unref (list_store); g_object_unref (list_store);
} }
else if (g_type_is_a (test_type, GTK_TYPE_LAYOUT_CHILD))
{
g_test_skip ("Skipping GtkLayoutChild type");
return;
}
else else
object = g_object_new (test_type, NULL); object = g_object_new (test_type, NULL);
g_assert (G_IS_OBJECT (object)); g_assert (G_IS_OBJECT (object));