maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Nokia Qt SDK and unit testing (https://talk.maemo.org/showthread.php?t=59391)

naabi 2010-07-29 12:09

Nokia Qt SDK and unit testing
 
Executive summary: I'm lost.

I'm writing some Qt software that really requires unit testing, i.e. functionality that is way too painful to get to decent level by playing with UI (ok, some other reasons exist for unit testing also:)). I'm unaware how to organize my tests and how to organize large amounts of tests. I've done following.

- Created an own project for tests
- Linked the project to be tested with this project (project dependencies from Qt Creator)
- Failed to compile the skeleton .cpp file that IDE creates. Compile output says "moc: Too many input files specified". This happens even without adding the other project as dependency.

I'm lost with the following stuff...

- Even though I'm building for Maemo 5, I would like to execute my tests on Windows. Functionality is separated from GUI. Howto do this?
- How can I organize my tests to multiple .cpp files to prevent me losing my mind. Seriously single file is not an option, and this is what Qt seems to be suggesting.

Yeah, kinda newbie with C++ also...

Joorin 2010-07-29 13:38

Re: Nokia Qt SDK and unit testing
 
Do you need the moc functionality if you're not testing GUI functionality?

I'd suggest creating a project that does not rely on Qt and create your tests that way.

Diph 2010-07-29 13:56

Re: Nokia Qt SDK and unit testing
 
You should check this: http://doc.trolltech.com/qt-maemo-4....ib-manual.html

naabi 2010-07-29 14:15

Re: Nokia Qt SDK and unit testing
 
Hi, I already went through all Qt material available there. Managed to get single tests compiled, so some progress there. Still I'm a bit confused how to organize the source code, e.g. Qt's own unit tests have a dedicated .pro file for each class. This might be the way to go.

Final problem seems to be MADDE and unit testing. Nokia's SDK, which I would like to use, forces the build target to be Symbian, MinGW or Fremantle. I wonder what's the most efficient way of executing these tests... Maybe I should move back to scratchbox.


All times are GMT. The time now is 01:19.

vBulletin® Version 3.8.8