[Interest] QTest + QSignalSpy doesn't seem to work with deferred signals
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Wed Jan 18 18:52:01 CET 2017
Il 18/01/2017 18:16, Bob Hood ha scritto:
> Is QTest capable of testing deferred results--i.e., evaluating tests results
> after the even loop has run again--or can only synchronous actions be tested?
> I know people have used qWait() and such in the past, or I supposed I could
> manually invoke the event loop within the unit test until signals are emitted,
> but I was wondering if QTest has been designed to handle that in a canonical
> fashion I'm not immediately seeing.
Just use QTRY_COMPARE instead of QCOMPARE.
HTH,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170118/01a9c184/attachment.bin>
More information about the Interest
mailing list