What is TINU?
TINU is a unit test framework. The way it organizes tests should be familiar to anyone who used xUnit or something similar.
Why another unit test framework?
In other test frameworks when a unit test failed, you cannot easily determine the exact problem and the location of the problen without using a debugger or logging a lot.
TINU offers some extra features usefull in solving that problem:
- Full stack trace of the failure
- Internal leak detector
- Handling segmentation faults without aborting
- Log test results to different destinations (syslog, file, etc.)
It started as a secondary idea. I was writing a backup application (which is currently on hold) and I needed to verify that my code works. The idea was to write each unit test right after implementing a feature.
In order to accomplish this I started writing a test framework. The first try was very simple: just a collection of macros. Soon I found that this approach had serious limitations (I couldn't organize my tests well and I had a lot of them).
After realizing this I wrote some bizarre C++ framework that was so complicated even I lost track. Which is counter-intuitive considering that unit tests must be as simple as possible.
The third iteration was the lucky one: the "interface" is almost self-explanatory (albeit a tutorial and some Doxygen-generated documentation is available). It should integrate well and I'm currently testing on syslog-ng's unit tests whether converting existing test code is easy or not.
What is the state of TINU?
The currently published code is mature enough to be used but some features are still missing. Also I'd like to port it to Windows and other UN*X systems (even some non-POSIX ones).
Where is it?
The project page (where the issue database, the Wiki and the on-line repository browser resides) can be found at http://tracker.bteam.hu/
The git repository can be cloned (read-only, all patches should at this time be sent to me directly):
git clone http://git.bteam.hu/~herczy/tinu.gitA small tutorial can be found on the project page, here.
EDIT: This arrangement is probably temporary only. The project will get a proper page soon.