PDA

View Full Version : How to use QTestLib to my project??



Klaxuz
3rd June 2010, 09:35
Hi!

I'm quite new with Qt and trying to unit test my project for the first time. I read the QTestLib tutorials but there's still a problem I can't figure out.

How can I use QTestLib to test my own classes? For example in my project I have class named statesrv which is in files statesrv.h and statesrv.cpp. How can I test that class using QTestLib? Should I make another unit testing project or can I do it within the main project?

Thanks for any answers!!

tbscope
3rd June 2010, 14:57
You can do both. Depends if you want to have the testing done in your main code tree or in a separate tree.
http://doc.qt.nokia.com/4.6/qtestlib-tutorial.html