tasn pushed a commit to branch master.
commit 7f4029638207beca67b86927413c07e632527aad
Author: Tom Hacohen <[email protected]>
Date: Fri Jun 14 13:33:32 2013 +0100
Sort exactness errors.
---
src/bin/exactness.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/bin/exactness.c b/src/bin/exactness.c
index 64ac78d..da4c36f 100644
--- a/src/bin/exactness.c
+++ b/src/bin/exactness.c
@@ -8,6 +8,21 @@
#include "config.h"
+static int
+_errors_sort_cb(List_Entry *a, List_Entry *b)
+{
+ return strcmp(a->name, b->name);
+}
+
+static void
+_exactness_errors_sort(Exactness_Ctx *ctx)
+{
+ ctx->errors =
+ eina_list_sort(ctx->errors, 0, (Eina_Compare_Cb) _errors_sort_cb);
+ ctx->compare_errors =
+ eina_list_sort(ctx->compare_errors, 0, (Eina_Compare_Cb) strcmp);
+}
+
static const Ecore_Getopt optdesc = {
"exactness",
"%prog [options] <-r|-p|-i|-s> <list file>",
@@ -171,6 +186,9 @@ main(int argc, char *argv[])
exactness_ctx.tests_executed,
eina_inlist_count(EINA_INLIST_GET(test_list)));
+ /* Sort the errors and the compare_errors. */
+ _exactness_errors_sort(&exactness_ctx);
+
if (exactness_ctx.errors || exactness_ctx.compare_errors)
{
FILE *report_file;
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev