gtk+ r21784 - in trunk: . gtk/tests



Author: cdywan
Date: Wed Nov 12 15:15:02 2008
New Revision: 21784
URL: http://svn.gnome.org/viewvc/gtk+?rev=21784&view=rev

Log:
2008-11-12  Christian Dywan  <christian imendio com>

	Bug 525550 â GTK+ 2.13.0 GtkCurve test fails

	* gtk/tests/object.c (list_ignore_properties),
	(object_test_property), (main): Ignore GtkCurve when testing

Modified:
   trunk/ChangeLog
   trunk/gtk/tests/object.c

Modified: trunk/gtk/tests/object.c
==============================================================================
--- trunk/gtk/tests/object.c	(original)
+++ trunk/gtk/tests/object.c	Wed Nov 12 15:15:02 2008
@@ -55,6 +55,7 @@
 {
   /* currently untestable properties */
   static const IgnoreProperty ignore_properties[] = {
+    { "GtkCurve",               "",                     NULL, },                        /* Just ignore it, not worth fixing */
     { "GtkContainer",           "child",                NULL, },                        /* needs working child widget */
     { "GtkRadioMenuItem",       "group",                NULL, },                        /* needs working sibling */
     { "GtkWidget",              "parent",               NULL, },                        /* needs working parent widget */
@@ -89,11 +90,6 @@
   static const IgnoreProperty bug_properties[] = {
     { "GtkComboBox",            "active",               (void*) MATCH_ANY_VALUE },      /* FIXME: triggers NULL model bug */
     { "GtkCTree",               "spacing",              (void*) MATCH_ANY_VALUE },      /* FIXME: triggers signedness bug */
-    { "GtkCurve",               "curve-type",           (void*) MATCH_ANY_VALUE },      /* FIXME: triggers OOM */
-    { "GtkCurve",               "min-x",                (void*) 0x80000000 },           /* FIXME: triggers coordinate OOB */
-    { "GtkCurve",               "min-y",                (void*) 0x80000000 },           /* FIXME: triggers coordinate OOB */
-    { "GtkCurve",               "max-x",                (void*) 0x80000000 },           /* FIXME: triggers coordinate OOB */
-    { "GtkCurve",               "max-y",                (void*) 0x80000000 },           /* FIXME: triggers coordinate OOB */
     { "GtkFileChooserButton",   "local-only",           (void*) MATCH_ANY_VALUE },      /* FIXME: triggers NULL path assertion */
     { "GtkFileChooserDialog",   "local-only",           (void*) MATCH_ANY_VALUE },      /* FIXME: triggers NULL path assertion */
     { "GtkFileChooserWidget",   "local-only",           (void*) MATCH_ANY_VALUE },      /* FIXME: triggers NULL path assertion */
@@ -227,7 +223,8 @@
       /* ignore untestable properties */
       ignore_properties = list_ignore_properties (FALSE);
       for (i = 0; ignore_properties[i].name; i++)
-        if (g_type_is_a (G_OBJECT_TYPE (object), g_type_from_name (ignore_properties[i].type_name)) &&
+        if (g_strcmp0 ("", ignore_properties[i].name) ||
+            g_type_is_a (G_OBJECT_TYPE (object), g_type_from_name (ignore_properties[i].type_name)) &&
             strcmp (pspec->name, ignore_properties[i].name) == 0 &&
             (MATCH_ANY_VALUE == ignore_properties[i].value ||
              value_as_pointer (&value) == ignore_properties[i].value ||
@@ -235,7 +232,7 @@
               strcmp (g_value_get_string (&value), ignore_properties[i].value) == 0)))
           break;
       /* ignore known property bugs if not testing thoroughly */
-      if (ignore_properties[i].name == NULL && !g_test_thorough())
+      if (ignore_properties[i].name == NULL && !g_test_thorough ())
         {
           ignore_properties = list_ignore_properties (TRUE);
           for (i = 0; ignore_properties[i].name; i++)
@@ -250,7 +247,7 @@
       /* assign unignored properties */
       if (ignore_properties[i].name == NULL)
         {
-          if (g_test_verbose())
+          if (g_test_verbose ())
             g_print ("PropertyTest: %s::%s := (%s value (%s): %p)\n",
                      g_type_name (G_OBJECT_TYPE (object)), pspec->name,
                      SELECT_NAME (dvalue), g_type_name (G_VALUE_TYPE (&value)),
@@ -330,7 +327,7 @@
   /* initialize test program */
   pixbuf_init ();
   gtk_test_init (&argc, &argv);
-  gtk_test_register_all_types();
+  gtk_test_register_all_types ();
   /* install a property test for each widget type */
   otypes = gtk_test_list_all_types (NULL);
   for (i = 0; otypes[i]; i++)
@@ -342,5 +339,5 @@
         g_test_add_data_func (testpath, (void*) otypes[i], widget_property_tests);
         g_free (testpath);
       }
-  return g_test_run();
+  return g_test_run ();
 }



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