diff --git a/ChangeLog b/ChangeLog index e23d88c89f..0bd23feb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-11 13:28:02 Tim Janik + + * 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 * modules/other/gail/libgail-util/Makefile.am diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c index 3a7fed99dd..dfafa7bfbe 100644 --- a/gtk/gtktestutils.c +++ b/gtk/gtktestutils.c @@ -457,7 +457,7 @@ gtk_test_text_get (GtkWidget *widget) * This function wraps g_object_new() for widget types. * It'll automatically show all created non window widgets, also * 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. */ @@ -477,10 +477,8 @@ gtk_test_create_widget (GType widget_type, if (!GTK_IS_WINDOW (widget)) gtk_widget_show (widget); g_object_ref_sink (widget); -#ifdef __G_TESTFRAMEWORK_H__ /* FIXME */ g_test_queue_unref (widget); g_test_queue_destroy ((GDestroyNotify) gtk_widget_destroy, widget); -#endif } return widget; } diff --git a/gtk/tests/testing.c b/gtk/tests/testing.c index 22cb861726..a7b43d5bd4 100644 --- a/gtk/tests/testing.c +++ b/gtk/tests/testing.c @@ -41,7 +41,6 @@ test_button_clicks (void) while (gtk_events_pending ()) gtk_main_iteration (); g_assert (a == 0 && b > 0 && c == 0); - gtk_widget_destroy (window); // FIXME: use generic teardown } static void @@ -64,7 +63,6 @@ test_button_keys (void) while (gtk_events_pending ()) gtk_main_iteration (); g_assert (a == 0 && b > 0 && c == 0); - gtk_widget_destroy (window); // FIXME: use generic teardown } static void @@ -89,7 +87,6 @@ test_slider_ranges (void) while (gtk_events_pending ()) gtk_main_iteration (); g_assert (gtk_test_slider_get_value (hscale) == +50.0); - gtk_widget_destroy (window); // FIXME: use generic teardown } static void @@ -119,8 +116,6 @@ test_text_access (void) g_assert (strcmp (text, "") == 0); g_free (text); } - for (i = 0; i < N_WIDGETS; i++) - gtk_widget_destroy (widgets[i]); // FIXME: use generic teardown } static void @@ -166,7 +161,6 @@ test_xserver_sync (void) } g_timer_destroy (gtimer); g_assert (sync_is_slower > 0); - gtk_widget_destroy (window); // FIXME: use generic teardown } static void @@ -212,8 +206,6 @@ test_spin_button_arrows (void) gtk_main_iteration (); oldval = gtk_test_slider_get_value (spinner); g_assert (oldval == 0); - /* shutdown */ - gtk_widget_destroy (window); // FIXME: use generic teardown } int