Question about unittesting

Albert Astals Cid aacid at kde.org
Mon Apr 9 14:42:03 BST 2012


El Diumenge, 8 d'abril de 2012, a les 21:45:34, Giorgos Tsiapaliwkas va 
escriure:
> Hello,
> 
> Why we don't have in KDE a macro like,
> 
> if (application_is_in_debug_mode) {
> //do some testing
> }

Because then you are not testing your real code anymore.

Albert

> 
> Why we need a macro like that?
> 
> a. Giorgos added a feature which deletes a folder from dolphin. Without
> this  macro in order Giorgos to
> test it he needs,
> -to create a dir
> -remove the dir
> -check if the remove was successful(this is the actual test)
> 
> but if we had this macro Giorgos would need to implement the last step.
> 
> c. we gain more time and it gets easier for contributors to add some
> testing code.
> A side note here, of course in vital libs only experienced developers
> should write the unittests,
> but in small applications contributors could also do the job.
> 
> Regards
> 
> P.S.: this macro could be enabled by adding in the cmake options something
> like "enable_unittest"




More information about the kde-core-devel mailing list