diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/auto.pro | 3 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_label.qml | 11 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_slider.qml | 2 | ||||
-rw-r--r-- | tests/auto/dialogs/tst_dialogs.cpp | 10 |
4 files changed, 20 insertions, 6 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 14860dc0..f3b76771 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -2,3 +2,6 @@ TEMPLATE = subdirs SUBDIRS += testplugin controls activeFocusOnTab applicationwindow dialogs \ extras qquicktreemodeladaptor customcontrolsstyle controls.depends = testplugin + +# QTBUG-60268 +boot2qt: SUBDIRS -= controls activeFocusOnTab applicationwindow dialogs extras customcontrolsstyle diff --git a/tests/auto/controls/data/tst_label.qml b/tests/auto/controls/data/tst_label.qml index e5c53a52..145c7f14 100644 --- a/tests/auto/controls/data/tst_label.qml +++ b/tests/auto/controls/data/tst_label.qml @@ -69,6 +69,17 @@ TestCase { label.destroy() } + function test_textPaddings() { + var label = Qt.createQmlObject('import QtQuick.Controls 1.2; Label { leftPadding: 2; rightPadding: 2; topPadding: 2; bottomPadding: 2 }', testCase, ''); + + compare(label.leftPadding, 2) + compare(label.rightPadding, 2) + compare(label.topPadding, 2) + compare(label.bottomPadding, 2) + + label.destroy() + } + function test_activeFocusOnTab() { if (Qt.styleHints.tabFocusBehavior != Qt.TabFocusAllControls) skip("This function doesn't support NOT iterating all.") diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml index 4cff6352..a27cf70e 100644 --- a/tests/auto/controls/data/tst_slider.qml +++ b/tests/auto/controls/data/tst_slider.qml @@ -346,7 +346,7 @@ Item { // drag less than the threshold distance mouseMove(control, pt.x + Settings.dragThreshold - 1, pt.y) - compare(control.value, 0.5) + verify(control.value > 0.5) // drag over the threshold mouseMove(control, pt.x + Settings.dragThreshold + 1, pt.y) diff --git a/tests/auto/dialogs/tst_dialogs.cpp b/tests/auto/dialogs/tst_dialogs.cpp index 1f139966..20da6e43 100644 --- a/tests/auto/dialogs/tst_dialogs.cpp +++ b/tests/auto/dialogs/tst_dialogs.cpp @@ -87,7 +87,7 @@ void tst_dialogs::dialogImplicitWidth() component.loadUrl(testFileUrl("DialogImplicitSize.qml")); QObject *created = component.create(); QScopedPointer<QObject> cleanup(created); - QVERIFY(created); + QVERIFY2(created, qPrintable(component.errorString())); QTRY_VERIFY(created->property("width").toInt() >= 400); QTRY_VERIFY(created->property("height").toInt() >= minimumHeight + heightMargins); @@ -100,7 +100,7 @@ void tst_dialogs::dialogContentResize() component.loadUrl(testFileUrl("DialogMinimumSize.qml")); QObject *created = component.create(); QScopedPointer<QObject> cleanup(created); - QVERIFY(created); + QVERIFY2(created, qPrintable(component.errorString())); QTRY_COMPARE(created->property("width").toInt(), 400); QTRY_COMPARE(created->property("height").toInt(), 300); @@ -121,7 +121,7 @@ void tst_dialogs::fileDialogDefaultModality() window->setGeometry(240,240,1024,320); window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); - QVERIFY(window->rootObject()); + QVERIFY2(window->rootObject(), qPrintable(window->errors().value(0).toString())); // Click to show QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog")); @@ -167,7 +167,7 @@ void tst_dialogs::fileDialogNonModal() window->setGeometry(240,240,1024,320); window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); - QVERIFY(window->rootObject()); + QVERIFY2(window->rootObject(), qPrintable(window->errors().value(0).toString())); // Click to toggle visibility QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog")); @@ -196,7 +196,7 @@ void tst_dialogs::fileDialogNameFilters() window->setGeometry(240,240,1024,320); window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); - QVERIFY(window->rootObject()); + QVERIFY2(window->rootObject(), qPrintable(window->errors().value(0).toString())); QObject *dlg = qvariant_cast<QObject *>(window->rootObject()->property("fileDialog")); QStringList filters; |