summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorØyvind Kolås <pippin@gimp.org>2018-11-16 22:32:10 +0100
committerØyvind Kolås <pippin@gimp.org>2018-11-16 22:32:54 +0100
commita5f169b56a3b288fdd5d0f4a824946c392c3096c (patch)
tree47ba1e18f31a89d988027bbafb1472efa5b3fa66 /tests
parentc0a4a98e75d0acb2b572415987711c1ab5fe02ab (diff)
tests: make srgb-to-lab-u8 also compile stand-alone
Diffstat (limited to 'tests')
-rw-r--r--tests/hsl.c3
-rw-r--r--tests/srgb_to_lab_u8.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/hsl.c b/tests/hsl.c
index 0457c7f..aaa1855 100644
--- a/tests/hsl.c
+++ b/tests/hsl.c
@@ -17,8 +17,7 @@
#include <stdio.h>
-#include "config.h"
-#include "babl.h"
+#include <babl/babl.h>
#include "common.inc"
diff --git a/tests/srgb_to_lab_u8.c b/tests/srgb_to_lab_u8.c
index 8974660..2b0e6ad 100644
--- a/tests/srgb_to_lab_u8.c
+++ b/tests/srgb_to_lab_u8.c
@@ -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;
}