test.xverify
Boolean test.xverify(condition)
Boolean test.xverify(condition, message)
This function is used to test for expected failures in test scripts. For handling of bugs that should be fixed one day.
The function evaluates the condition
and if it evaluates to a false value (e.g., anything that isn't true
or that's non-zero), a test result of type XFAIL (eXpected FAILure) is added to the test log. Otherwise a test result of type XPASS (uneXpected PASS) is added. In either case the function returns the result of evaluating the condition
, (i.e., a false value on XFAIL and a true value on XPASS).
If the optional message
parameter (of type string—e.g., a comment, bug number, or test plan reference) is present, it will be added to the test result whether the test passed or failed.
The testSettings.breakOnFailure property can be used to make the debugger stop in case the verification passes unexpectedly.
The testSettings.throwOnFailure property can be used to make this function raise a script exception in case the verification passes unexpectedly.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.