summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtimer/tst_qtimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtimer/tst_qtimer.cpp')
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 43b7553..8c8f1e3 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -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"
-\