Details
-
Suggestion
-
Resolution: Out of scope
-
P4: Low
-
4.3.2
-
None
Description
There is already the Q_ASSERT macro but it would be handy if something similar to the MFC VERIFY() macro was added. The difference between ASSERT and VERIFY is that with ASSERT(functionCall()) the functionCall() does not run in Release mode, but does with VERIFY. So the expression in VERIFY is run in any mode and asserts actually in debug mode.
Naive implementation would be
Q_VERIFY(X)
{ const bool result = (X); Q_ASSERT(result); }