[gtk+] tests: Up the ante



commit 0c990229565d9730253a79c2afb4c50b88449d8f
Author: Benjamin Otte <otte redhat com>
Date:   Sun Nov 13 04:43:32 2011 +0100

    tests: Up the ante
    
    Put 10000 rows into the tree-performance test, so the tests don't finish
    in <1s. That's too little for profiling.

 tests/a11y/tree-performance.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/a11y/tree-performance.c b/tests/a11y/tree-performance.c
index d75599f..266b6e8 100644
--- a/tests/a11y/tree-performance.c
+++ b/tests/a11y/tree-performance.c
@@ -22,6 +22,8 @@
 
 #include <gtk/gtk.h>
 
+#define N_ROWS 10000
+
 const gchar list_ui[] =
   "<interface>"
   "  <object class='GtkListStore' id='liststore1'>"
@@ -136,7 +138,7 @@ populate_list (GtkBuilder *builder)
   store = (GtkListStore *)gtk_tree_view_get_model (tv);
 
   /* append a thousand rows */
-  for (i = 0; i < 1000; i++)
+  for (i = 0; i < N_ROWS; i++)
     {
       gtk_list_store_append (store, &iter);
       gtk_list_store_set (store, &iter, 0, "Bla", 1, "Bla bla", 2, "Bla bla bla", 3, i % 2 == 0 ? TRUE : FALSE, 4, i % 100, 5, i, -1);
@@ -277,7 +279,7 @@ populate_tree (GtkBuilder *builder)
   store = (GtkTreeStore *)gtk_tree_view_get_model (tv);
 
   /* append a thousand rows */
-  for (i = 0; i < 333; i++)
+  for (i = 0; i < N_ROWS / 3; i++)
     {
       gtk_tree_store_append (store, &iter, NULL);
       gtk_tree_store_set (store, &iter, 0, "Bla", 1, "Bla bla", 2, "Bla bla bla", 3, i % 2 == 0 ? TRUE : FALSE, 4, i % 100, 5, i, -1);



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