summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtimer/tst_qtimer.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-14 16:29:13 +1000
committerWarwick Allison <warwick.allison@nokia.com>2009-08-14 16:29:13 +1000
commit0c831b8cf84c72ee8673d1d38f4e93e350dddd5f (patch)
tree84fc3c89d73342ec70d77b2bdf99066f987536b8 /tests/auto/qtimer/tst_qtimer.cpp
parentb98b7d305ffebb700e471bd64a7dee59d947e056 (diff)
parent4b1b93f3f97de70af316052bc38048f52631b9e4 (diff)
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/qtimer/tst_qtimer.cpp')
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 43b755347..e3e28b519 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -73,6 +73,7 @@ public slots:
void init();
void cleanup();
private slots:
+ void zeroTimer();
void singleShotTimeout();
void timeout();
void livelock_data();
@@ -129,6 +130,20 @@ void tst_QTimer::cleanup()
{
}
+void tst_QTimer::zeroTimer()
+{
+ TimerHelper helper;
+ QTimer timer;
+ timer.setInterval(0);
+ timer.start();
+
+ connect(&timer, SIGNAL(timeout()), &helper, SLOT(timeout()));
+
+ QCoreApplication::processEvents();
+
+ QCOMPARE(helper.count, 1);
+}
+
void tst_QTimer::singleShotTimeout()
{
TimerHelper helper;
@@ -482,4 +497,3 @@ void tst_QTimer::restartedTimerFiresTooSoon()
QTEST_MAIN(tst_QTimer)
#include "tst_qtimer.moc"
-\