Remove insignification from QDateTimeEdit test on Mac OS X.

This test only has stable failures. Mark those with QEXPECT_FAIL and
re-enable the test.

Task-number: QTBUG-23674
Change-Id: I0e6cfe4f1992410bbc27b266f7bdafa14451aff7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
Jason McDonald 2012-04-20 02:41:39 +10:00 committed by Qt by Nokia
parent 8e11d8b3ae
commit fb449f426e
2 changed files with 33 additions and 1 deletions

View File

@ -4,4 +4,3 @@ QT += widgets testlib
SOURCES += tst_qdatetimeedit.cpp
wincewm50smart-msvc2005: DEFINES += WINCE_NO_MODIFIER_KEYS
mac:CONFIG += insignificant_test # numerous failures, see QTBUG-23674

View File

@ -786,6 +786,9 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys()
QTest::keyClick(testWidget, Qt::Key_Home);
#endif
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ShiftModifier);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("1"));
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ShiftModifier);
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11"));
@ -889,6 +892,9 @@ void tst_QDateTimeEdit::backspaceKey()
#endif
QCOMPARE(testWidget->text(), QString("11/05/2004"));
QTest::keyClick(testWidget, Qt::Key_Backspace);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->text(), QString("11/05/200"));
QTest::keyClick(testWidget, Qt::Key_Backspace);
QCOMPARE(testWidget->text(), QString("11/05/20"));
@ -1025,6 +1031,9 @@ void tst_QDateTimeEdit::enterKey()
QTest::keyClick(testWidget, Qt::Key_Home);
#endif
QTest::keyClick(testWidget, Qt::Key_Enter);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QVERIFY(!testWidget->lineEdit()->hasSelectedText());
#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
@ -2550,6 +2559,9 @@ void tst_QDateTimeEdit::newCase()
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
#endif
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->lineEdit()->selectedText(), QString());
QTest::keyClick(testWidget, Qt::Key_Right);
@ -2627,6 +2639,9 @@ void tst_QDateTimeEdit::cursorPos()
QTest::keyClick(testWidget, Qt::Key_Return);
QTest::keyClick(testWidget, Qt::Key_3);
QTest::keyClick(testWidget, Qt::Key_1);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->lineEdit()->cursorPosition(), 3);
}
@ -2660,6 +2675,9 @@ void tst_QDateTimeEdit::newCase5()
QTest::keyClick(testWidget, Qt::Key_1);
QTest::keyClick(testWidget, Qt::Key_2);
QTest::keyClick(testWidget, Qt::Key_4);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->lineEdit()->displayText(), QString("2005-10-07 17:44:13 124 ms"));
QTest::keyClick(testWidget, Qt::Key_Backspace);
@ -2769,6 +2787,9 @@ void tst_QDateTimeEdit::setSelectedSection()
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
#endif
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QVERIFY(!testWidget->lineEdit()->hasSelectedText());
testWidget->setSelectedSection(QDateTimeEdit::MinuteSection);
@ -2886,6 +2907,9 @@ void tst_QDateTimeEdit::reverseTest()
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
#endif
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->currentSection(), QDateTimeEdit::DaySection);
QTest::keyClick(testWidget, Qt::Key_Up);
@ -3039,6 +3063,9 @@ void tst_QDateTimeEdit::ddMMMMyyyy()
QTest::keyClick(testWidget, Qt::Key_End);
#endif
QTest::keyClick(testWidget, Qt::Key_Backspace);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(testWidget->lineEdit()->text(), "01." + QDate::longMonthName(1) + ".200");
}
@ -3328,6 +3355,9 @@ void tst_QDateTimeEdit::potentialYYValueBug()
QTest::keyClick(&edit, Qt::Key_End);
#endif
QTest::keyClick(&edit, Qt::Key_Backspace);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(edit.text(), QString("14/09/5"));
}
@ -3343,6 +3373,9 @@ void tst_QDateTimeEdit::textSectionAtEnd()
QTest::keyClick(&edit, Qt::Key_End);
#endif
QTest::keyClick(&edit, Qt::Key_Backspace);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23674", Abort);
#endif
QCOMPARE(edit.text(), QString("Januar"));
}