[Development] Supporting helper functions in auto tests by providing throwing Qt Test macros
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Wed Apr 3 17:52:54 CEST 2019
Il 03/04/19 17:06, Edward Welbourne ha scritto:
> There is a whole world of difference between "can only be used in" and
> "is not recommended for use outside". The note is incorrect: if you use
> these macros inside a helper function, they do cause the test system to
> know the test has failed. They merely don't cause the caller of the
> helper to return prematurely, unless the helper checks for whether they
> failed.
This note is our Get Out of Jail Free card, though. We can claim that
any usage of test macros outside test functions was unsupported, hence
we are allowed to break source compatibility for them (by turning them
into exception throwers).
My 2 c,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The 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/development/attachments/20190403/f4b79649/attachment.bin>
More information about the Development
mailing list