From 080a1f3ff328005b78f89381c8d9faf4b0b8e16c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 19 Oct 2011 13:24:34 +1000 Subject: Remove SkipMode from qtestlib API. The SkipMode parameter to QSKIP has been removed in qtbase, therefore it must also be removed here. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I8016f8c28338b1b532bdb593c796d699b99250dc Reviewed-by: Charles Yin Reviewed-by: Rohan McGovern --- src/imports/testlib/TestCase.qml | 5 +++-- src/imports/testlib/testcase.qdoc | 14 +------------- src/qmltest/quicktestresult.cpp | 9 +-------- src/qmltest/quicktestresult_p.h | 3 +-- 4 files changed, 6 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 020f934aac..fd04c786a2 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -307,14 +307,15 @@ Item { function skip(msg) { if (msg === undefined) msg = "" - qtest_results.skipSingle(msg, util.callerFile(), util.callerLine()) + qtest_results.skip(msg, util.callerFile(), util.callerLine()) throw new Error("QtQuickTest::skip") } function skipAll(msg) { if (msg === undefined) msg = "" - qtest_results.skipAll(msg, util.callerFile(), util.callerLine()) + warn("The skipAll function is deprecated and will be removed soon. Please update this test by changing skipAll to skip.") + qtest_results.skip(msg, util.callerFile(), util.callerLine()) throw new Error("QtQuickTest::skip") } diff --git a/src/imports/testlib/testcase.qdoc b/src/imports/testlib/testcase.qdoc index c08af334e5..719d9baea7 100644 --- a/src/imports/testlib/testcase.qdoc +++ b/src/imports/testlib/testcase.qdoc @@ -362,19 +362,7 @@ Skips the current test case and prints the optional \a message. If this is a data-driven test, then only the current row is skipped. - Similar to \c{QSKIP(message, SkipSingle)} in C++. - - \sa skipAll() -*/ - -/*! - \qmlmethod TestCase::skipAll(message = "") - - Skips the current test case and prints the optional \a message. - If this is a data-driven test, then all remaining rows are skipped. - Similar to \c{QSKIP(message, SkipAll)} in C++. - - \sa skip() + Similar to \c{QSKIP(message)} in C++. */ /*! diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index f3379ad14b..1924be0d26 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -404,14 +404,7 @@ bool QuickTestResult::compare } } -void QuickTestResult::skipSingle - (const QString &message, const QString &file, int line) -{ - QTestResult::addSkip(message.toLatin1().constData(), - qtest_fixFile(file).toLatin1().constData(), line); -} - -void QuickTestResult::skipAll +void QuickTestResult::skip (const QString &message, const QString &file, int line) { QTestResult::addSkip(message.toLatin1().constData(), diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h index 3e0ea18d25..8707b563e4 100644 --- a/src/qmltest/quicktestresult_p.h +++ b/src/qmltest/quicktestresult_p.h @@ -129,8 +129,7 @@ public Q_SLOTS: bool compare(bool success, const QString &message, const QString &val1, const QString &val2, const QString &file, int line); - void skipSingle(const QString &message, const QString &file, int line); - void skipAll(const QString &message, const QString &file, int line); + void skip(const QString &message, const QString &file, int line); bool expectFail(const QString &tag, const QString &comment, const QString &file, int line); bool expectFailContinue(const QString &tag, const QString &comment, -- cgit v1.2.3