gtk+ r19352 - in trunk: . gtk gtk/tests



Author: timj
Date: Fri Jan 11 12:29:29 2008
New Revision: 19352
URL: http://svn.gnome.org/viewvc/gtk+?rev=19352&view=rev

Log:
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.




Modified:
   trunk/ChangeLog
   trunk/gtk/gtktestutils.c
   trunk/gtk/tests/testing.c

Modified: trunk/gtk/gtktestutils.c
==============================================================================
--- trunk/gtk/gtktestutils.c	(original)
+++ trunk/gtk/gtktestutils.c	Fri Jan 11 12:29:29 2008
@@ -457,7 +457,7 @@
  * 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 @@
       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;
 }

Modified: trunk/gtk/tests/testing.c
==============================================================================
--- trunk/gtk/tests/testing.c	(original)
+++ trunk/gtk/tests/testing.c	Fri Jan 11 12:29:29 2008
@@ -41,7 +41,6 @@
   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 @@
   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 @@
   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 @@
       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 @@
     }
   g_timer_destroy (gtimer);
   g_assert (sync_is_slower > 0);
-  gtk_widget_destroy (window); // FIXME: use generic teardown
 }
 
 static void
@@ -212,8 +206,6 @@
     gtk_main_iteration ();
   oldval = gtk_test_slider_get_value (spinner);
   g_assert (oldval == 0);
-  /* shutdown */
-  gtk_widget_destroy (window); // FIXME: use generic teardown
 }
 
 int



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]