Well, maybe it doesn't matter, since the same person always answers posts .
To elaborate on what I'm getting at, I'm used to frameworks(junit, nunit) / IDEs(eclipse, VS) that will run "all" your tests (for a given project) in one go, even if they are in different libraries. I'm trying to do that with QT.
So you're saying I need /proj/tests/projtests.pro to look something like this:
QT += testlib
TARGET = Tests
CONFIG += console
TEMPLATE = app
SOURCES += main.cpp
include(../data/tests/datatests.pri)
include(../foo/tests/footests.pri)
include(../bar/tests/bartests.pri)
QT += testlib
TARGET = Tests
CONFIG += console
TEMPLATE = app
SOURCES += main.cpp
include(../data/tests/datatests.pri)
include(../foo/tests/footests.pri)
include(../bar/tests/bartests.pri)
To copy to clipboard, switch view to plain text mode
And then a corresponding /proj/tests/main.cpp like this:
#include <QTest>
int main(int argc, char *argv[])
{
DataTests test1;
FooTests test2;
BarTests test3;
QTest.qExec(&test1);
QTest.qExec(&test2);
QTest.qExec(&test3);
return 0;
}
#include <QTest>
int main(int argc, char *argv[])
{
DataTests test1;
FooTests test2;
BarTests test3;
QTest.qExec(&test1);
QTest.qExec(&test2);
QTest.qExec(&test3);
return 0;
}
To copy to clipboard, switch view to plain text mode
Do I need to #include the .moc files in this case?
Bookmarks