P
P
Pretendi2015-06-30 22:57:07
Qt
Pretendi, 2015-06-30 22:57:07

How to compile and run all tests in qt?

There is a tests folder, it contains several files for tests of different modules
at the end of each file there is something like that

QTEST_MAIN(TestClass1)
#include "testclass1.moc

If you make a common project that compiles all tests, then it swears at QTEST_MAIN , each test has its own main.
For each test, start your own folder and project, or how to do it right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tasty Ib, 2015-07-06
@Pretendy

Put all tests in separate folder, CONFIG += testcase in each pro file, make check to run tests
example from qtc

D
DancingOnWater, 2015-07-01
@DancingOnWater

Put all the tests in a separate folder and walk through them with a project that runs a batch file that walks through all the executable files in the folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question