[Interest] QTest::qWait Error

jason.mcdonald at nokia.com jason.mcdonald at nokia.com
Mon Mar 26 13:56:07 CEST 2012


Hi Lucas,

> I'm trying to write Unit Tests.
> Because I have to wait till some data arrived from network and a signal triggers, I want to use qWait.
>
> But everytime I use qWait I get this error, even when there is nothing but qWait in the code.
>
> QCOMPARE, QVERIFY etc are working, 
> I have added testlib to my .pro file.
>
> Any ideas what I'm doing wrong?
 
The assertion indicates that your test program does not have an instance of the QCoreApplication class.  Most likely this means that you are using the QTEST_APPLESS_MAIN macro to generate the test program's main() or that you have written your own main() and it does not create a QCoreApplication.

You can propbably fix this by using the QTEST_MAIN macro to generate your main().

--
Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PBrush 1.jpg
Type: image/jpeg
Size: 30814 bytes
Desc: PBrush 1.jpg
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120326/6cceb0f8/attachment.jpg>


More information about the Interest mailing list