Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.9.0
-
None
-
Qt 5.9.0, mingw5.3.0
Description
While calling a member function that throws is correctly tested,
QVERIFY_EXCEPTION_THROWN(object.methodThrowing(), std::runtime_error);
verifying that a constructor fails is not possible as such
QVERIFY_EXCEPTION_THROWN(ObjectConstructorThrowing(), std::runtime_error);
It appears the latter is optimised out in release mode. Should the macro expression be wrapped in a Q_UNUSED?