Sort exactness errors.

This commit is contained in:
Tom Hacohen 2013-06-14 13:33:32 +01:00
parent 4b8326ad60
commit 7f40296382
1 changed files with 18 additions and 0 deletions

View File

@ -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;