Hello,
is there a way to declare multiple classes as Qt testclasses? Atm I have to write all unittests in one class, this doesn't scale very vell imo..
Any other way to use more classes?
Thanks for answer
Hello,
is there a way to declare multiple classes as Qt testclasses? Atm I have to write all unittests in one class, this doesn't scale very vell imo..
Any other way to use more classes?
Thanks for answer
Sure you can. Just don't use QTEST_MAIN() but instead call all test objects one by one yourself. You can check what QTEST_MAIN expands to to provide your own implementation of the main() function.
Yes, you can exec each class directly but I find that can be a mission.
Perhaps if you want exact control of the execution order that may be the way to go but unit tests should be standalone anyways so execution order should not be that important.
Instead try qttestutil:
http://el-tramo.be/blog/qttestutil
Bookmarks