Call to arms, implement very simple unit tests



I added very clear and precise todo items in the (code of the) current
unit tests. They are not at all very difficult. They are small (some
todo tests are less than five lines of code). It's easy to add them. All
the infrastructure and code is already there. Pre-typed for you. You
just need to implement the tests themselves.

For example:

https://svn.tinymail.org/svn/tinymail/trunk/libtinymail-test/tny-device-iface-test.c

This one has existing tests implemented. It's a good example:

https://svn.tinymail.org/svn/tinymail/trunk/libtinymail-test/tny-list-iface-test.c

While implementing a unit test, never forget that a unit test isn't
intended to pass existing implementation. A unit test is intended to act
as test for the contract of an interface versus an implementation of
that interface. You can ask me what this contract should be if it's
unclear for a specific interface.

-- If it's unclear, it actually also means that I didn't document the
design enough. So your question will also trigger me into upgrading the
design and implementation documentation.

If the contract conflicts with the current implementation, then that's
because I *AM* an idiot who should have implement a unit test before
writing code (what I sometimes did, I confess). It also means that my
implementation is wrong and that you can prove that by implementing a
unit test.

And trust me .. I want to be proven wrong, because that is THE FASTEST
WAY that I CAN *know* about the mistakes and bugs that I made. The
target here is the quality of the framework. While improving that
quality, you can enjoy the pleasure of proving me wrong. How great is
that?! :)

I will of course appreciate people who will on top of implementing a
unit test, fix the implementation (if a detect is found).


-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]