koffice/libs/pigment

Boudewijn Rempt boud at valdyas.org
Thu Oct 28 12:38:27 CEST 2010


On Monday 25 October 2010, Marc Pegon wrote:
> SVN commit 1189573 by pegon:
> 
> Fixed BUG:242805 (weird behavior of the color mode).
> 
> 
>  M  +3 -0      KoColorConversions.cpp  
> 
> 
> --- trunk/koffice/libs/pigment/KoColorConversions.cpp #1189572:1189573
> @@ -382,7 +382,10 @@
>          *h = (r == m ? 3.0 + g2 : 5.0 - r2);
>  
>      *h *= 60;
> +    if (*h == 360.) {
> +        *h = 0;
>  }
> +}
>  
>  void HSLToRGB(float h, float sl, float l, float *r, float *g, float *b)
>  
> 
> 

I suspect that you forgot to update the unittest:

boud at valdis:~/kde/build/koffice/libs/pigment/tests> ./TestColorConversion
********* Start testing of TestColorConversion *********
Config: Using QTest library 4.7.1, Qt 4.7.1
PASS   : TestColorConversion::initTestCase()
PASS   : TestColorConversion::testRGBHSV()
FAIL!  : TestColorConversion::testRGBHSL() Compared floats are not the same (fuzzy compare)
   Actual (h): 0
   Expected (360.0f): 360
   Loc: [/home/boud/kde/src/koffice/libs/pigment/tests/TestColorConversion.cpp(104)]
PASS   : TestColorConversion::cleanupTes



-- 
Boudewijn Rempt | http://www.valdyas.org
Ceterum censeo lapsum particulorum probae delendum esse


More information about the kimageshop mailing list