[gegl] tests: change difference criteria of test-image-compare



commit 81db71e55963d8543c033ebe153c59447d21c386
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Oct 6 18:22:13 2017 +0200

    tests: change difference criteria of test-image-compare
    
    The computed differences vary based on compiler (gcc vs clang) and
    architecture, 32bit vs 64bit. The new comparison delta of 0.1 in CIE Lab is
    1/10 (or 1/25th) of a perceptible difference - which is close enough when
    floating point archiectures and compilers (probably with different precision
    for intermediate results) get in the way of being completely reproducible.

 tests/simple/test-image-compare.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/simple/test-image-compare.c b/tests/simple/test-image-compare.c
index d93479b..bc4d83c 100644
--- a/tests/simple/test-image-compare.c
+++ b/tests/simple/test-image-compare.c
@@ -108,7 +108,7 @@ compare_values (GeglNode            *comparison,
   test_result = SUCCESS;
 
   if (fabs (actual_result.max_diff - expected_result->max_diff)
-      > 0.005)
+      > 0.1)
     {
       g_printerr ("The max_diff property differs: %f instead of %f. ",
                   (gfloat) actual_result.max_diff,
@@ -116,7 +116,7 @@ compare_values (GeglNode            *comparison,
       test_result = FAILURE;
     }
   if (fabs (actual_result.avg_diff_wrong - expected_result->avg_diff_wrong)
-      > 0.005)
+      > 0.1)
     {
       g_printerr ("The avg_diff_wrong property differs: %f instead of %f. ",
                   (gfloat) actual_result.avg_diff_wrong,
@@ -124,7 +124,7 @@ compare_values (GeglNode            *comparison,
       test_result = FAILURE;
     }
   if (fabs (actual_result.avg_diff_total - expected_result->avg_diff_total)
-      > 0.005)
+      > 0.1)
     {
       g_printerr ("The avg_diff_total property differs: %f instead of %f. ",
                   (gfloat) actual_result.avg_diff_total,


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