summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-01-07 20:46:46 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-01-08 12:23:48 -0800
commit4b7db28157052c6a402114a5796da809105886be (patch)
tree4b016b5234175ac6d8c193d25df94f8de1c61d10 /test
parent656eb8766c147f4429115b8431511d6213859684 (diff)
downloadqtlocation-mapboxgl-4b7db28157052c6a402114a5796da809105886be.tar.gz
[tests] Test that Timer::stop on a stopped timer is a no-op
Diffstat (limited to 'test')
-rw-r--r--test/miscellaneous/timer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/miscellaneous/timer.cpp b/test/miscellaneous/timer.cpp
index aaac4e2f8e..7e5928406e 100644
--- a/test/miscellaneous/timer.cpp
+++ b/test/miscellaneous/timer.cpp
@@ -177,3 +177,11 @@ TEST(Timer, StartOverrides) {
EXPECT_GE(totalTime, expectedTotalTime * 0.8);
EXPECT_LE(totalTime, expectedTotalTime * 1.2);
}
+
+TEST(Timer, CanStopNonStartedTimer) {
+ RunLoop loop;
+
+ Timer timer;
+ timer.unref();
+ timer.stop();
+}