Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin
Modified Files:
main.c
Log Message:
sort the tests
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/main.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- main.c 17 Oct 2007 14:51:33 -0000 1.73
+++ main.c 17 Oct 2007 21:35:07 -0000 1.74
@@ -44,6 +44,7 @@
static int ewl_test_setup_tests(void);
static void ewl_test_free(Ewl_Test *test);
+static int ewl_test_compare(Ewl_Test *test1, Ewl_Test *test2);
static void ewl_test_print_tests(void);
static void run_test_boxed(Ewl_Test *t);
@@ -407,6 +408,10 @@
/* no tests found ... */
if (ecore_list_count(tests) == 0) return 0;
+ /* sort the tests in alphabetical order */
+ ecore_list_sort(tests, ECORE_COMPARE_CB(ewl_test_compare),
+ ECORE_SORT_MIN);
+
return 1;
}
@@ -415,6 +420,12 @@
{
if (test->plugin) ecore_plugin_unload(test->plugin);
free(test);
+}
+
+static int
+ewl_test_compare(Ewl_Test *test1, Ewl_Test *test2)
+{
+ return strcasecmp(test1->name, test2->name);
}
static int
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs