Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.1
-
None
Description
Document that using Q_ASSERT in unit tests should be avoided and demonstrate alternatives.
Using Q_ASSERT causes a test program to abort, resulting in incomplete/malformed test output and preventing remaining test functions in the test program from being executed. It is better to report a test failure using QVERIFY (which will skip the rest of the current test function) and allow the test program to continue executing.
Attachments
Issue Links
- relates to
-
QTBUG-17582 Review auto tests regarding the transforming of usage of use of macros like Q_ASSERT into QVERIFY or similar QTestLib macro
-
- Closed
-