removed old testutils special casing so test widgets are always queues for
2008-01-11 13:28:02 Tim Janik <timj@imendio.com> * gtk/gtktestutils.c (gtk_test_create_widget): removed old testutils special casing so test widgets are always queues for destruction during teardown. * gtk/tests/testing.c: removed bits left-over from testing without gtestutils.h. svn path=/trunk/; revision=19352
This commit is contained in:
committed by
Tim Janik
parent
7fc21d35d7
commit
1d0392c558
@ -1,3 +1,12 @@
|
|||||||
|
2008-01-11 13:28:02 Tim Janik <timj@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtktestutils.c (gtk_test_create_widget): removed old testutils
|
||||||
|
special casing so test widgets are always queues for destruction
|
||||||
|
during teardown.
|
||||||
|
|
||||||
|
* gtk/tests/testing.c: removed bits left-over from testing without
|
||||||
|
gtestutils.h.
|
||||||
|
|
||||||
2008-01-10 Tor Lillqvist <tml@novell.com>
|
2008-01-10 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* modules/other/gail/libgail-util/Makefile.am
|
* modules/other/gail/libgail-util/Makefile.am
|
||||||
|
|||||||
@ -457,7 +457,7 @@ gtk_test_text_get (GtkWidget *widget)
|
|||||||
* This function wraps g_object_new() for widget types.
|
* This function wraps g_object_new() for widget types.
|
||||||
* It'll automatically show all created non window widgets, also
|
* It'll automatically show all created non window widgets, also
|
||||||
* g_object_ref_sink() them (to keep them alive across a running test)
|
* g_object_ref_sink() them (to keep them alive across a running test)
|
||||||
* and set them up for destruction during test teardown phase.
|
* and set them up for destruction during the next test teardown phase.
|
||||||
*
|
*
|
||||||
* Returns: a newly created widget.
|
* Returns: a newly created widget.
|
||||||
*/
|
*/
|
||||||
@ -477,10 +477,8 @@ gtk_test_create_widget (GType widget_type,
|
|||||||
if (!GTK_IS_WINDOW (widget))
|
if (!GTK_IS_WINDOW (widget))
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
g_object_ref_sink (widget);
|
g_object_ref_sink (widget);
|
||||||
#ifdef __G_TESTFRAMEWORK_H__ /* FIXME */
|
|
||||||
g_test_queue_unref (widget);
|
g_test_queue_unref (widget);
|
||||||
g_test_queue_destroy ((GDestroyNotify) gtk_widget_destroy, widget);
|
g_test_queue_destroy ((GDestroyNotify) gtk_widget_destroy, widget);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,6 @@ test_button_clicks (void)
|
|||||||
while (gtk_events_pending ())
|
while (gtk_events_pending ())
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
g_assert (a == 0 && b > 0 && c == 0);
|
g_assert (a == 0 && b > 0 && c == 0);
|
||||||
gtk_widget_destroy (window); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -64,7 +63,6 @@ test_button_keys (void)
|
|||||||
while (gtk_events_pending ())
|
while (gtk_events_pending ())
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
g_assert (a == 0 && b > 0 && c == 0);
|
g_assert (a == 0 && b > 0 && c == 0);
|
||||||
gtk_widget_destroy (window); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -89,7 +87,6 @@ test_slider_ranges (void)
|
|||||||
while (gtk_events_pending ())
|
while (gtk_events_pending ())
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
g_assert (gtk_test_slider_get_value (hscale) == +50.0);
|
g_assert (gtk_test_slider_get_value (hscale) == +50.0);
|
||||||
gtk_widget_destroy (window); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -119,8 +116,6 @@ test_text_access (void)
|
|||||||
g_assert (strcmp (text, "") == 0);
|
g_assert (strcmp (text, "") == 0);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
}
|
}
|
||||||
for (i = 0; i < N_WIDGETS; i++)
|
|
||||||
gtk_widget_destroy (widgets[i]); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -166,7 +161,6 @@ test_xserver_sync (void)
|
|||||||
}
|
}
|
||||||
g_timer_destroy (gtimer);
|
g_timer_destroy (gtimer);
|
||||||
g_assert (sync_is_slower > 0);
|
g_assert (sync_is_slower > 0);
|
||||||
gtk_widget_destroy (window); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -212,8 +206,6 @@ test_spin_button_arrows (void)
|
|||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
oldval = gtk_test_slider_get_value (spinner);
|
oldval = gtk_test_slider_get_value (spinner);
|
||||||
g_assert (oldval == 0);
|
g_assert (oldval == 0);
|
||||||
/* shutdown */
|
|
||||||
gtk_widget_destroy (window); // FIXME: use generic teardown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user