[babl] tests: fix palette-concurrency-stress-test



commit 246c6c7af1c1d67c70ec9a937f72b34c7176f646
Author: Ell <ell_se yahoo com>
Date:   Sat May 19 08:28:19 2018 -0400

    tests: fix palette-concurrency-stress-test
    
    Fix palette-concurrency-stress-test to accommodate the change to a
    gamma-corrected 8-bit format (commit
    fabcc6729ed453fb5c5affc565d0e837a78afc5c), and to little-endian
    hash indices (commit 55ca45c8233af138d3fd388587b203d802b8396c).
    
    The test should pass regardless, it simply didn't actually test for
    the intended issue previously.

 tests/palette-concurrency-stress-test.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/palette-concurrency-stress-test.c b/tests/palette-concurrency-stress-test.c
index 806c8ce..869cd90 100644
--- a/tests/palette-concurrency-stress-test.c
+++ b/tests/palette-concurrency-stress-test.c
@@ -77,13 +77,13 @@ main (int    argc,
 
       v = i * BABL_PALETTE_HASH_TABLE_SIZE;
 
-      p[0] = (v >> 16) & 0xff;
+      p[0] = (v >>  0) & 0xff;
       p[1] = (v >>  8) & 0xff;
-      p[2] = (v >>  0) & 0xff;
+      p[2] = (v >> 16) & 0xff;
       p[3] = 0xff;
     }
 
-  babl_palette_set_palette (pal, babl_format ("RGBA u8"), colors, N_THREADS);
+  babl_palette_set_palette (pal, babl_format ("R'G'B'A u8"), colors, N_THREADS);
 
   /* initialize the thread contexts such that each thread processes a buffer
    * containing a single, distinct color
@@ -92,7 +92,7 @@ main (int    argc,
     {
       ctx[i] = malloc (sizeof (ThreadContext));
 
-      ctx[i]->fish = babl_fish (babl_format ("RGBA u8"), pal_format);
+      ctx[i]->fish = babl_fish (babl_format ("R'G'B'A u8"), pal_format);
 
       for (j = 0; j < 4 * N_PIXELS; j++)
         {


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