diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-09-11 08:38:34 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-09-11 08:38:34 (GMT) |
commit | 842ee1617923443ebb78d998ca3c5c8721442d91 (patch) | |
tree | 4bf0a45a23d8c0ede1f22ef8529c242142ba6fa7 /tests | |
parent | dacb14e457b40b6839e9f17ec968e95e29113d20 (diff) | |
parent | 76f52ec783ec58a8a4b2f093d3eeb96087ddde28 (diff) | |
download | Qt-842ee1617923443ebb78d998ca3c5c8721442d91.zip Qt-842ee1617923443ebb78d998ca3c5c8721442d91.tar.gz Qt-842ee1617923443ebb78d998ca3c5c8721442d91.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/bic/tst_bic.cpp | 2 | ||||
-rw-r--r-- | tests/auto/q3progressbar/tst_q3progressbar.cpp | 14 | ||||
-rw-r--r-- | tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 4 |
3 files changed, 15 insertions, 5 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index db0c5ba..82c8dc0 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -293,7 +293,7 @@ void tst_Bic::sizesAndVTables() bool isFailed = false; - qDebug() << oldLib.arg(libName); + //qDebug() << oldLib.arg(libName); if (oldLib.isEmpty() || !QFile::exists(oldLib.arg(libName))) QSKIP("No platform spec found for this platform/version.", SkipSingle); diff --git a/tests/auto/q3progressbar/tst_q3progressbar.cpp b/tests/auto/q3progressbar/tst_q3progressbar.cpp index c5485a7..34a95d3 100644 --- a/tests/auto/q3progressbar/tst_q3progressbar.cpp +++ b/tests/auto/q3progressbar/tst_q3progressbar.cpp @@ -93,11 +93,15 @@ class MyCustomProgressBar : public Q3ProgressBar void paintEvent(QPaintEvent * event) { paintNumber++; + qDebug() << "PAINT EVENT:" << paintNumber; Q3ProgressBar::paintEvent(event); } int paintNumber; }; +/* + Maybe this test should be redesigned. + */ void tst_Q3ProgressBar::setProgress() { MyCustomProgressBar * m_progressBar = new MyCustomProgressBar(); @@ -111,15 +115,21 @@ void tst_Q3ProgressBar::setProgress() m_progressBar->setProgress(m_progressBar->progress() + 1); QCOMPARE(oldValue + 1,m_progressBar->progress()); QApplication::processEvents(); - QVERIFY(m_progressBar->paintNumber >= 1); //it might be more than 1 because it is animated + // It might be > 1 because it is animated. + QVERIFY(m_progressBar->paintNumber >= 1); + qDebug() << "Animation test: paintNumber =" << m_progressBar->paintNumber; + //standard case m_progressBar->setTotalSteps(3); m_progressBar->setProgress(0); m_progressBar->paintNumber = 0; m_progressBar->setProgress(m_progressBar->progress() + 1); QApplication::processEvents(); - QCOMPARE(m_progressBar->paintNumber,1); + + // It might be > 1 because other events might cause painting. + QVERIFY(m_progressBar->paintNumber >= 1); + qDebug() << "Standard test: paintNumber =" << m_progressBar->paintNumber; } QTEST_MAIN(tst_Q3ProgressBar) diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index c0d870f..1180d4d 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -895,9 +895,9 @@ void tst_QLocalSocket::writeToClientAndDisconnect() QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); clientSocket->waitForBytesWritten(); clientSocket->disconnectFromServer(); - qApp->processEvents(); // give the socket the chance to receive data + QVERIFY(client.waitForReadyRead()); QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); - qApp->processEvents(); // give the socket the chance to close itself + QVERIFY(client.waitForDisconnected()); QCOMPARE(client.state(), QLocalSocket::UnconnectedState); } |