[gtk+] tests: Use testing API instead of duplicating it



commit 06a8fac3e909e7df4bd888cbb76964479ae80abc
Author: Benjamin Otte <otte redhat com>
Date:   Wed May 15 15:25:05 2013 +0200

    tests: Use testing API instead of duplicating it

 gtk/tests/accessible.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtk/tests/accessible.c b/gtk/tests/accessible.c
index b44cb14..03668c3 100644
--- a/gtk/tests/accessible.c
+++ b/gtk/tests/accessible.c
@@ -21,17 +21,14 @@ test_type (GType t)
 int
 main (int argc, char *argv[])
 {
-  GType *tp;
-  gint i;
+  const GType *tp;
+  guint i, n;
 
   gtk_init (&argc, &argv);
 
-  tp = g_new0 (GType, 1000);
-#undef GDK_WINDOWING_X11
-#include "../gtktypefuncs.c"
-  *tp = 0;
+  tp = gtk_test_list_all_types (&n);
 
-  for (i = 0; tp[i]; i++)
+  for (i = 0; i < n; n++)
     test_type (tp[i]);
 
   return 0;


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