A first part of the layers/masks patch

Boudewijn Rempt boud at valdyas.org
Sun Sep 27 12:20:45 CEST 2009


On Sunday 27 September 2009, Boudewijn Rempt wrote:
> Btw, if the unittests pass, please commit your patches. I think everyone
> agrees on that now.
> 

I've applied the patch now by hacking out the conflicts and the only test I 
see failing is KisPaintLayerTest on the transparency mask, which is fixed by 
not inverting the mask.

About the other comments in the paint layer test: 

    /**
     * FIXME: Needs approval by someone else
     * This is quite insane demands as a projection is still no way updated.
     * There is no difference for us whether layer->projection() is equal
     * to layer->paintDevice() or is equal to NULL, isn't it?
     */
    // Which also means that the projection is no longer the paint device
    //QVERIFY(layer->paintDevice().data() != layer->projection().data());


This is a check that as soon as we add masks, there is a projection. Not 
whether the projection has been updated or now. Now, if the projection is only 
created during the recomposition process in the new situation this test 
doesn't hold.

You have to understand the basic nature of a unittest: it tests the expected 
behaviour of a class. If you change that behaviour, you have to change the 
test accordingly, but not just comment out tests. We have to be certain that 
this class is well behaved.

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


More information about the kimageshop mailing list