[babl] tests: constify tests



commit e803b072f06e2e2717fd2be0df4b3c5f058cf6ca
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sun Mar 18 16:57:04 2012 +0000

    tests: constify tests

 tests/concurrency-stress-test.c |    2 +-
 tests/extract.c                 |    2 +-
 tests/grayscale_to_rgb.c        |    2 +-
 tests/n_components.c            |    6 +++---
 tests/palette.c                 |    6 +++---
 tests/rgb_to_bgr.c              |    2 +-
 tests/rgb_to_ycbcr.c            |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/tests/concurrency-stress-test.c b/tests/concurrency-stress-test.c
index 20d31b4..7832c23 100644
--- a/tests/concurrency-stress-test.c
+++ b/tests/concurrency-stress-test.c
@@ -39,7 +39,7 @@ babl_fish_path_stress_test_thread_func (void *not_used)
       /* Try to get a fish with an as complex conversion path as
        * possible
        */
-      Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
+      const Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
 
       /* Just do something random with the fish */
       babl_get_name (fish);
diff --git a/tests/extract.c b/tests/extract.c
index db52f3d..6f6e927 100644
--- a/tests/extract.c
+++ b/tests/extract.c
@@ -25,7 +25,7 @@
 
 #define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
   {       \
-  Babl *fish;       \
+  const Babl *fish;       \
   int i;       \
   fish = babl_fish (src_fmt, dst_fmt);       \
   if (!fish)       \
diff --git a/tests/grayscale_to_rgb.c b/tests/grayscale_to_rgb.c
index 8e004b9..6658f7f 100644
--- a/tests/grayscale_to_rgb.c
+++ b/tests/grayscale_to_rgb.c
@@ -31,7 +31,7 @@ float rgb_buf     [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
diff --git a/tests/n_components.c b/tests/n_components.c
index 0cfeb11..0d62e7d 100644
--- a/tests/n_components.c
+++ b/tests/n_components.c
@@ -77,9 +77,9 @@ test (void)
 
   for (components = 1; components < 2048; components ++)
   {
-    Babl *fish;
-    Babl *src_fmt;
-    Babl *dst_fmt;
+    const Babl *fish;
+    const Babl *src_fmt;
+    const Babl *dst_fmt;
     int   i;
 
     src_fmt = babl_format_n (babl_type ("float"), components);
diff --git a/tests/palette.c b/tests/palette.c
index 25a6033..6ad517f 100644
--- a/tests/palette.c
+++ b/tests/palette.c
@@ -25,7 +25,7 @@
 
 #define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
   {       \
-  Babl *fish;       \
+  const Babl *fish;       \
   int i;       \
   fish = babl_fish (src_fmt, dst_fmt);       \
   if (!fish)       \
@@ -58,7 +58,7 @@ main (int    argc,
   if(1){
     unsigned char in[][1]   = {{        0},{          1},{          2},{15}};
     unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
-    Babl *palA;// = babl_new_palette (NULL, 0);
+    const Babl *palA;// = babl_new_palette (NULL, 0);
     //Babl *palB = babl_new_palette (NULL, 0);
     //
     babl_new_palette (NULL, &palA, NULL);
@@ -71,7 +71,7 @@ main (int    argc,
   if(0){
     unsigned char in[][2]   = {{    0,255},{      1,255},{      2,255},{15,200}};
     unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
-    Babl *palA;// = babl_new_palette (NULL, 0);
+    const Babl *palA;// = babl_new_palette (NULL, 0);
     //Babl *palB = babl_new_palette (NULL, 0);
     //
     babl_new_palette (NULL, NULL, &palA);
diff --git a/tests/rgb_to_bgr.c b/tests/rgb_to_bgr.c
index 51986ee..60fee1f 100644
--- a/tests/rgb_to_bgr.c
+++ b/tests/rgb_to_bgr.c
@@ -39,7 +39,7 @@ unsigned char destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
diff --git a/tests/rgb_to_ycbcr.c b/tests/rgb_to_ycbcr.c
index 6efc796..49ddee3 100644
--- a/tests/rgb_to_ycbcr.c
+++ b/tests/rgb_to_ycbcr.c
@@ -46,7 +46,7 @@ float destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 



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