Active Topics

 


Reply
Thread Tools
Posts: 219 | Thanked: 94 times | Joined on Nov 2009 @ Helsinki, Finland
#1
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...
__________________
Ham > Turkey
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
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.
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 180 | Thanked: 76 times | Joined on May 2010
#3
 

The Following User Says Thank You to Diph For This Useful Post:
Posts: 219 | Thanked: 94 times | Joined on Nov 2009 @ Helsinki, Finland
#4
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.
__________________
Ham > Turkey

Last edited by naabi; 2010-07-29 at 14:18.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:40.