Originally Posted by
Artschi
QUnitTest is the Qt's UnitTest framework, right?
You mean QTestLib?
In the Qt UnitTest framework the main() is not accessable and the question is:
How to create an XAppliation instance in the Qt UnitTest application.
This is not true. You may skip using QTEST_MAIN() macro and implement your own main(). The macro is only for convenience. It is defined as:
#define QTEST_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
#define QTEST_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
QApplication app(argc, argv); \
TestObject tc; \
return QTest::qExec(&tc, argc, argv); \
}
To copy to clipboard, switch view to plain text mode
Bookmarks