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")
}
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++.
*/
/*!
}
}
-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(),
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,
void tst_parserstress::ecmascript()
{
#ifndef TESTDATADIR
- QSKIP("Needs QtScript sources", SkipAll);
+ QSKIP("Needs QtScript sources");
#else
QFETCH(QString, file);
void tst_qdeclarativeapplication::active()
{
- QSKIP("QTBUG-21573", SkipAll);
+ QSKIP("QTBUG-21573");
QDeclarativeComponent component(&engine);
component.setData("import QtQuick 2.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile(""));
void tst_qdeclarativeapplication::layoutDirection()
{
- QSKIP("QTBUG-21573", SkipAll);
+ QSKIP("QTBUG-21573");
QDeclarativeComponent component(&engine);
component.setData("import QtQuick 2.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile(""));
QVERIFY(object.property("foo").isObject());
QVERIFY(!object.property("foo").isVariant());
QScriptValue originalProto = object.property("foo").prototype();
- QSKIP("It is not possible to promote plain object to a wrapper", SkipAll);
+ QSKIP("It is not possible to promote plain object to a wrapper");
QScriptValue ret = eng.newVariant(object.property("foo"), QVariant(123));
QVERIFY(ret.isValid());
QVERIFY(ret.strictlyEquals(object.property("foo")));
void tst_QJSEngine::newVariant_promoteNonQScriptObject()
{
- QSKIP("This test relay on limitation of QtScript JSC implementation", SkipAll);
+ QSKIP("This test relay on limitation of QtScript JSC implementation");
QScriptEngine eng;
{
QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::newVariant(): changing class of non-QScriptObject not supported");
void tst_QJSEngine::newQObject_sameQObject()
{
#if 0 // ###FIXME: No QObjectWrapOptions API
- QSKIP("This test stongly relay on strictlyEquals feature that would change in near future", SkipAll);
+ QSKIP("This test stongly relay on strictlyEquals feature that would change in near future");
QScriptEngine eng;
// calling newQObject() several times with same object
for (int x = 0; x < 2; ++x) {
void tst_QJSEngine::newQObject_promoteNonQScriptObject()
{
#if 0 // ### FIXME: object promotion is not supported
- QSKIP("Promotion of non QScriptObjects kind of works (there is not difference between Object and Array, look at comments in newQObject implementation).", SkipAll);
+ QSKIP("Promotion of non QScriptObjects kind of works (there is not difference between Object and Array, look at comments in newQObject implementation).");
QScriptEngine eng;
{
QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::newQObject(): changing class of non-QScriptObject not supported");
#if 0 // ###FIXME: No activation object support
void tst_QJSEngine::newActivationObject()
{
- QSKIP("internal function not implemented in JSC-based back-end", SkipAll);
+ QSKIP("internal function not implemented in JSC-based back-end");
QScriptEngine eng;
QScriptValue act = eng.newActivationObject();
QEXPECT_FAIL("", "", Continue);
void tst_QJSEngine::abortEvaluation_tryCatch()
{
- QSKIP("It crashes", SkipAll);
+ QSKIP("It crashes");
QScriptEngine eng;
EventReceiver3 receiver(&eng);
eng.setProcessEventsInterval(100);
void tst_QJSEngine::jsFutureReservedWords()
{
- QSKIP("Fails", SkipAll);
+ QSKIP("Fails");
// See ECMA-262 Section 7.6.1.2, "Future Reserved Words".
// In real-world implementations, most of these words are
// actually allowed as normal identifiers.
QCOMPARE(anim->currentFrame(), 0); // animation only has 2 frames, should cycle back to first
QPixmap frame0_flipped = QPixmap::fromImage(canvas->grabFrameBuffer());
- QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved", SkipSingle);
+ QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved");
QTransform transform;
transform.translate(width, 0).scale(-1, 1.0);
anim->setProperty("mirror", true);
screenshot = QPixmap::fromImage(canvas->grabFrameBuffer());
- QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved", SkipSingle);
+ QSKIP("Skip while QTBUG-19351 and QTBUG-19252 are not resolved");
QCOMPARE(screenshot, expected);
// mirroring should not change the current frame or playing status
void tst_qsgflickable::flickVelocity()
{
#ifdef Q_WS_MAC
- QSKIP("Producing flicks on Mac CI impossible due to timing problems", SkipAll);
+ QSKIP("Producing flicks on Mac CI impossible due to timing problems");
#endif
QSGView *canvas = new QSGView;
void tst_qsgimage::svg()
{
if (!QImageReader::supportedImageFormats().contains("svg"))
- QSKIP("svg support not available", SkipAll);
+ QSKIP("svg support not available");
QString src = QUrl::fromLocalFile(TESTDATA("heart.svg")).toString();
QString componentStr = "import QtQuick 2.0\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
void tst_qsgpositioners::test_attachedproperties_dynamic()
{
- QSKIP("QTBUG-21995 - Test crashes on exit", SkipAll);
+ QSKIP("QTBUG-21995 - Test crashes on exit");
QSGView *canvas = createView(TESTDATA("attachedproperties-dynamic.qml"));
QVERIFY(canvas->rootObject() != 0);
void tst_qsgtext::alignments()
{
-
- QSKIP("Text alignment pixmap comparison tests will not work with scenegraph", SkipAll);
+ QSKIP("Text alignment pixmap comparison tests will not work with scenegraph");
#if (0)// No widgets in scenegraph
QFETCH(int, hAlign);
QFETCH(int, vAlign);
void tst_qsgtextedit::alignments()
{
- QSKIP("Image comparison of text is almost guaranteed to fail during development", SkipAll);
+ QSKIP("Image comparison of text is almost guaranteed to fail during development");
QFETCH(int, hAlign);
QFETCH(int, vAlign);
if (status == noErr)
CFRelease(pasteboard);
else
- QSKIP("This machine doesn't support the clipboard", SkipAll);
+ QSKIP("This machine doesn't support the clipboard");
}
#endif
void tst_qsgtextinput::horizontalAlignment()
{
- QSKIP("Image comparison of text is almost guaranteed to fail during development", SkipAll);
+ QSKIP("Image comparison of text is almost guaranteed to fail during development");
QFETCH(int, hAlign);
QFETCH(QString, expectfile);
if (status == noErr)
CFRelease(pasteboard);
else
- QSKIP("This machine doesn't support the clipboard", SkipAll);
+ QSKIP("This machine doesn't support the clipboard");
}
#endif
void tst_qsgtextinput::cursorRectangle()
{
- QSKIP("QTBUG-21689", SkipAll);
+ QSKIP("QTBUG-21689");
QString text = "Hello World!";
}
}
- function skipSingle(msg, file, line) {
- failmsg = "skipSingle:" + msg
- }
-
- function skipAll(msg, file, line) {
- failmsg = "skipAll:" + msg
+ function skip(msg, file, line) {
+ failmsg = "skip:" + msg
}
}
testCase.skip("foo")
} catch (e) {
compare(e.message, "QtQuickTest::skip")
- compare(functions.failmsg, "skipSingle:foo")
+ compare(functions.failmsg, "skip:foo")
caught = true
}
verify(caught)
testCase.skip()
} catch (e) {
compare(e.message, "QtQuickTest::skip")
- compare(functions.failmsg, "skipSingle:")
- caught = true
- }
- verify(caught)
-
- caught = false
- try {
- testCase.skipAll("foo")
- } catch (e) {
- compare(e.message, "QtQuickTest::skip")
- compare(functions.failmsg, "skipAll:foo")
- caught = true
- }
- verify(caught)
-
- caught = false
- try {
- testCase.skipAll()
- } catch (e) {
- compare(e.message, "QtQuickTest::skip")
- compare(functions.failmsg, "skipAll:")
+ compare(functions.failmsg, "skip:")
caught = true
}
verify(caught)
}
{
- QSKIP("This causes a lockup due to Bearer management stuff", SkipSingle);
+ QSKIP("This causes a lockup due to Bearer management stuff");
QUrl source(QUrl::fromLocalFile(SRCDIR "/data/loop2.qml"));
QString expect = source.toString() + ":8:3: QML Image: Possible anchor loop detected on horizontal anchor.";
void tst_qdeclarativeflickable::flickVelocity()
{
#ifdef Q_WS_MAC
- QSKIP("Producing flicks on Mac CI impossible due to timing problems", SkipAll);
+ QSKIP("Producing flicks on Mac CI impossible due to timing problems");
#endif
QDeclarativeView *canvas = new QDeclarativeView;
if (status == noErr)
CFRelease(pasteboard);
else
- QSKIP("This machine doesn't support the clipboard", SkipAll);
+ QSKIP("This machine doesn't support the clipboard");
}
#endif
if (status == noErr)
CFRelease(pasteboard);
else
- QSKIP("This machine doesn't support the clipboard", SkipAll);
+ QSKIP("This machine doesn't support the clipboard");
}
#endif
QFETCH(QString, type);
QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 2, 0);
if (!t || !t->isCreatable())
- QSKIP("Non-creatable type", SkipSingle);
+ QSKIP("Non-creatable type");
QBENCHMARK {
QObject *obj = t->create();