K_GLOBAL_STATIC and unittests?

Boudewijn Rempt boud at valdyas.org
Sat Oct 17 12:19:27 BST 2009

On Saturday 17 October 2009, Thiago Macieira wrote:
> Em Sábado 17. Outubro 2009, às 09.49.54, Boudewijn Rempt escreveu:
> > It seems that statics created with K_GLOBAL_STATIC aren't destroyed when
> >  they are created in a unittest, though it works perfectly in a real
> >  application. Is that something known or intentional?
> Global statics are destroyed when the application exits. That's too late
>  for the tests.

Ah, I thought something defined by, say, 
QTEST_KDEMAIN(KisPaintDeviceActionTest, GUI) was an application, so I expected 
K_GLOBAL_STATIC to be destroyed on shutdown. 

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

More information about the kde-core-devel mailing list