Svens Blog

Things that really matter...
...at least for me ;-)
September 2010
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
2627282930
< Aug   Oct >

[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.
Comment
Name: (Required)
Email: (Notification Only)
Website: (Optional)
Remember Me
Comment:  


Allowed Tags: <em><i><b><strong><br><code><pre><ol><ul><li>
  Auto Break