Re: Question about unittesting

2012-04-09 Thread Albert Astals Cid
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?

Question about unittesting

2012-04-08 Thread Giorgos Tsiapaliwkas
Hello, Why we don't have in KDE a macro like, if (application_is_in_debug_mode) { //do some testing } 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

Re: Question about unittesting

2012-04-08 Thread Kevin Krammer
On Sunday, 2012-04-08, Kevin Krammer wrote: At KDE we usually use the QTest framework [1] for unittesting and we have cmake macros that make it easy to add them to a project's CMakeLists.txt (e.f. see [2]) and some C/C++ helper macros that make writing them easier [3]. Cheers, Kevin

Re: Question about unittesting

2012-04-08 Thread Thomas Lübking
Am 08.04.2012, 22:39 Uhr, schrieb Kevin Krammer kram...@kde.org: if (application_is_in_debug_mode) { //do some testing } How would a macro make things different? Something like IF_DEBUG_MODE { // do some testing } so the developer does not have to remember how to check a command line

Re: Question about unittesting

2012-04-08 Thread Thomas Zander
On Sunday 08 April 2012 22.57.05 Thomas Lübking wrote: I think he wants a macro to execute a branch only in debug compilation mode, ie. he's probably looking for Q_ASSERT(deleteSuccedded(path)); or in doubt sth. stronger than debug that only acts on testing, ie. a global cmake option