summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-08-11 08:07:59 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-08-11 08:07:59 (GMT)
commit02e0523fe2b1dfd08eadaf127023306f6aa64c6f (patch)
tree26f374407ac0976e69f092517d69e1c93332492c /tests/auto
parentd501b04974df3615ac12fa93e11e893a44fbe715 (diff)
parentc7a18308a2725e4d1763777cb549f1ae74848005 (diff)
downloadQt-02e0523fe2b1dfd08eadaf127023306f6aa64c6f.zip
Qt-02e0523fe2b1dfd08eadaf127023306f6aa64c6f.tar.gz
Qt-02e0523fe2b1dfd08eadaf127023306f6aa64c6f.tar.bz2
Merge commit 'remotes/origin/4.7' into qt47s2
Conflicts: doc/src/examples/simpletreemodel.qdoc doc/src/examples/spinboxdelegate.qdoc doc/src/index.qdoc src/declarative/qml/qdeclarativeimageprovider.cpp
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp2
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp2
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp44
3 files changed, 47 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index d5a911a..db1f191 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -585,7 +585,7 @@ void tst_qdeclarativeinstruction::dump()
<< "45\t\t48\tDEFER\t\t\t7"
<< "46\t\tNA\tDEFER\t\t\t7"
<< "47\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
- << "48\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
+ << "48\t\t50\tXXX UNKNOWN INSTRUCTION\t1234"
<< "49\t\t51\tSTORE_VARIANT_INTEGER\t\t32\t11"
<< "50\t\t52\tSTORE_VARIANT_DOUBLE\t\t19\t33.7"
<< "-------------------------------------------------------------------------------";
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 0c12974..6c1dd8f 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -1072,6 +1072,7 @@ void tst_QSslSocket::wildcardCertificateNames()
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example.com"), QString("www.example.com")), true );
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx*.example.com"), QString("xxxwww.example.com")), true );
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("f*.example.com"), QString("foo.example.com")), true );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("192.168.0.0"), QString("192.168.0.0")), true );
// Failing CN matches
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("xxx.example.com"), QString("www.example.com")), false );
@@ -1085,6 +1086,7 @@ void tst_QSslSocket::wildcardCertificateNames()
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.example."), QString("www.example")), false );
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString(""), QString("www")), false );
QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*"), QString("www")), false );
+ QCOMPARE( QSslSocketBackendPrivate::isMatchingHostname(QString("*.168.0.0"), QString("192.168.0.0")), false );
}
void tst_QSslSocket::wildcard()
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index a0408ef..8d213ed 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -86,6 +86,7 @@ private slots:
void timerIdPersistsAfterThreadExit();
void cancelLongTimer();
void singleShotStaticFunctionZeroTimeout();
+ void recurseOnTimeoutAndStopTimer();
};
class TimerHelper : public QObject
@@ -623,5 +624,48 @@ void tst_QTimer::singleShotStaticFunctionZeroTimeout()
QCOMPARE(helper.count, 1);
}
+class RecursOnTimeoutAndStopTimerTimer : public QObject
+{
+ Q_OBJECT
+
+public:
+ QTimer *one;
+ QTimer *two;
+
+public slots:
+ void onetrigger()
+ {
+ QCoreApplication::processEvents();
+ }
+
+ void twotrigger()
+ {
+ one->stop();
+ }
+};
+
+void tst_QTimer::recurseOnTimeoutAndStopTimer()
+{
+ QEventLoop eventLoop;
+ QTimer::singleShot(1000, &eventLoop, SLOT(quit()));
+
+ RecursOnTimeoutAndStopTimerTimer t;
+ t.one = new QTimer(&t);
+ t.two = new QTimer(&t);
+
+ QObject::connect(t.one, SIGNAL(timeout()), &t, SLOT(onetrigger()));
+ QObject::connect(t.two, SIGNAL(timeout()), &t, SLOT(twotrigger()));
+
+ t.two->setSingleShot(true);
+
+ t.one->start();
+ t.two->start();
+
+ (void) eventLoop.exec();
+
+ QVERIFY(!t.one->isActive());
+ QVERIFY(!t.two->isActive());
+}
+
QTEST_MAIN(tst_QTimer)
#include "tst_qtimer.moc"