tests: make srgb-to-lab-u8 also compile stand-alone
authorØyvind Kolås <pippin@gimp.org>
Fri, 16 Nov 2018 21:32:10 +0000 (22:32 +0100)
committerØyvind Kolås <pippin@gimp.org>
Fri, 16 Nov 2018 21:32:54 +0000 (22:32 +0100)
tests/hsl.c
tests/srgb_to_lab_u8.c

index 0457c7f0c5af95954f2c1c55588cda58c109d436..aaa1855ce80848a76ff589eba2f5f11cc79a0acf 100644 (file)
@@ -17,8 +17,7 @@
 
 #include <stdio.h>
 
-#include "config.h"
-#include "babl.h"
+#include <babl/babl.h>
 
 #include "common.inc"
 
index 8974660fc41c63ad27d395625628921186d0028e..2b0e6ad5f082f48354cbaceeab5d5a4bfc877b21 100644 (file)
@@ -16,9 +16,9 @@
  * <https://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
 #include <math.h>
-#include "babl-internal.h"
+#include <babl/babl.h>
+#include <stdio.h>
 
 #define PIXELS       6
 #define TOLERANCE    0
@@ -53,9 +53,9 @@ test (void)
 
   for (i = 0; i < PIXELS * 3; i++)
     {
-      if (abs (destination_buf[i] - reference_buf[i]) > TOLERANCE)
+      if (fabs (destination_buf[i] - reference_buf[i]) > TOLERANCE)
         {
-          babl_log ("%2i (%2i%%3=%i, %2i/3=%i) is %i should be %i",
+          fprintf (stderr, "%2i (%2i%%3=%i, %2i/3=%i) is %i should be %i",
                     i, i, i % 3, i, i / 3, destination_buf[i], reference_buf[i]);
           OK = 0;
         }