our failing unittests...

Boudewijn Rempt boud at valdyas.org
Tue Mar 8 06:08:28 CET 2011


On Monday 07 March 2011, Silvio Heinrich wrote:
> On 03/07/2011 06:49 AM, Boudewijn Rempt wrote:
> > Silvio -- for the extra ops you have added, do we have tests as well?
> >
> O_o well... err... no.
> You don't really want me to write a test for every CompositeOp? :D

Well.. Having tests help with regressions, and we have had some regressions in composite op code before. Can't we figure out a way to generate these tests?

> This would be at least 2 tests for one OP (with and without alpha locking).
> How many do exist right now 50 or 60?
> And I think different they should be tested with different color 
> spaces/bit depths too (RGBA 8bit, RGBA 16bit, RGBA float16bit, and so on...)
> I mean if it is absolutely necessary the most sane solution would be to 
> create little reference images for the OPs.
> A source image and a destination image and then for every CompositeOp an 
> image with the expected result of this CompositeOp.
> And then the Test combines the source and destination image with every 
> CompositeOp and tests the result against the reference images.
> Well, I don't know if it's worth the effort.

We can generate the images and then have the tests run in a loop, it should be fairly simple. 


-- 
Boudewijn Rempt | http://www.valdyas.org, http://www.krita.org


More information about the kimageshop mailing list