Svens Blog

Things that really matter...
...at least for me ;-)
February 2010
SunMonTueWedThuFriSat
12356
7910111213
14151617181920
21222324252627
28
< Jan   Mar >

[Recent Entries]
[Entry Index]

Administration
[Login]
Recent Entries
Topics
Andere Blogs
RSS 2.0 Feed

Valid CSS!
Valid XHTML 1.0!
Valid RSS!

No software patents!
Campaign for a Non-Browser Specific WWW
darkerradio - DIE Alternative im Netz - Tune In, Turn On, Burn Out
Some rights reserved
Aktion UBERWACH!
Play Ogg!
  GSoC Status Update July/2
21. July 2009, 01:21PM
Posted By Sven Krohlas
This week I was thinking about the idea that came up after the last status report: why a gui if mainly developers will run the tests? So I checked out the ways Qt offers to make each test class a standalone executable (using the QTEST_MAIN macro). This is quite nice but has a massive drawback: compiling and linking to more complicated classes with a lot of dependencies to other parts of Amarok and generated files becomes a pita (I tried that with PlaylistManager). Those problems vanish when integrating all tests into Amarok itself. So on my branch we have now a new parameter --test for Amarok, intended to run all available unit tests. The constructor of a test class now simply calls the init-, test- and cleanup-methods.

This approach is quite fast currently (here two test classes are being run):
amarok:             BEGIN: static void App::runUnitTests()
amarok:             END__: static void App::runUnitTests() - Took 0.00038s
But... I also miss any output currently. when looking at the docs about QCOMPARE they shocked me a bit: "Note: This macro can only be used in a test function that is invoked by the test framework.". Well, so I might need to write some utility functions/macros for that approach. I'm still investigating this problem atm.
[Permalink]   [Add Comment]   [Trackback]   [Google]   (209 Words)