So, the new C++ based unit testing framwork is now working. A simple
amarok --test
will run all available tests. Logs can then be found in
~/.kde4/share/apps/amarok/testdata/<datetime>/
or whatever directory this corresponds in your distribution. Currently there are tests for SmartPointerList (which already existed and just were adopted to the new system), parts of PlaylistManager and several funtions in Amarok.h.
The tests in Amarok.h also already found a few bugs, especially in Amarok::vfatPath() (at this point I could fill pages with rants about how evil VFAT and the Windows API are...). It was really nice to see progress in the tests when trying to get the function to work as expected. The tests caught regressions quite well. I was able to perfectly see for which data it crashed or delivered wrong results when working on the code and introducing an error. Automated testing definitely can save a lot of time!
The tests for Amarok::cleanPath() also still fail partly. Oh, and if someone could run all the tests, especially the ones for Amarok::vfatPath() under Windows it would really be great, too. :)
The current code with detailled commit messages can now be found on Gitorious:
http://gitorious.org/~krohlas/amarok/krohlass-clone.
Next on my agenda are the remaining tests in Amarok.h and working on getting those for Amarok::cleanPath() to run successfully, but not by changing the tests. ;-)