[RFC] KUnitTest library
Zack Rusin
zrusin at trolltech.com
Fri Apr 8 13:10:32 BST 2005
On Friday 08 April 2005 08:03, David Faure wrote:
> On Friday 08 April 2005 13:05, Jeroen Wijnhout wrote:
> > Well, there are some (although perhaps you just don't care about
> > those): * code sharing
> > * you automatically benefit from improvements in the library
> > * you don't have to edit the kunittest.cpp file
>
> And the main one IMHO:
> * ease of use, i.e. having very little code to write when adding a
> new test. It should be as easy as: adding a method to an existing
> test object (and it gets autodetected via QObject's slots mechanism)
> or adding a file with a new test object (and adding it to
> Makefile.am).
I'm surprised that geiseri hasn't yet commented on this thread. We
talked quite a bit about unit testing and validation testing.
I thought about QObject's introspection but at the end decided that I'd
prefer if the core of the lib didn't depend on anything. Furthermore
one of my biggest pet peeves is having to keep header/source in sync. I
thought about creating a helper executer who would first parse straight
cpp source files and create headers from them, then compile it all into
an object (assuming the modification on the cpp is newer than the
compiled object). But I was afraid that the execution time would be too
slow, especially with parsing of the cpp files.
Unit testing library is something that is trivial to write but almost
impossible to get right :)
Zack
--
All those who believe in telekinesis, raise my hand.
More information about the kde-core-devel
mailing list