From d766ae045741e28c8934c5a17def28e1f9b3f791 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 20 Oct 2011 12:12:43 +1000 Subject: [PATCH] Update QSKIP documentation. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I3d4cf8e11756b92fe9d97f01a02c61cbf2df1556 Reviewed-by: Rohan McGovern --- src/testlib/qtestcase.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 0ff760be388..a12f6e36d39 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -271,17 +271,25 @@ QT_BEGIN_NAMESPACE \relates QTest - The QSKIP() macro stops execution of the test without adding a failure to the - test log. You can use it to skip tests that wouldn't make sense in the current - configuration. The text \a description is appended to the test log and should - contain an explanation of why the test couldn't be executed. + If called from a test function, the QSKIP() macro stops execution of the test + without adding a failure to the test log. You can use it to skip tests that + wouldn't make sense in the current configuration. The text \a description is + appended to the test log and should contain an explanation of why the test + couldn't be executed. - If the test is data-driven, each call to QSKIP() will skip only the current row, - so an unconditional call to QSKIP will produce one skip message in the test log - for each row of test data. + If the test is data-driven, each call to QSKIP() will skip only the current + row of test data, so an unconditional call to QSKIP will produce one skip + message in the test log for each row of test data. - \bold {Note:} This macro can only be used in a test function that is invoked - by the test framework. + If called from an _data function, the QSKIP() macro will stop execution of + the _data function and will prevent execution of the associated test + function. + + If called from initTestCase() or initTestCase_data(), the QSKIP() macro will + skip all test and _data functions. + + \bold {Note:} This macro can only be used in a test function or _data + function that is invoked by the test framework. Example: \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 8