summaryrefslogtreecommitdiff
path: root/test/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/timer.cpp')
-rw-r--r--test/timer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/timer.cpp b/test/timer.cpp
index 41c132bd..addebce3 100644
--- a/test/timer.cpp
+++ b/test/timer.cpp
@@ -152,6 +152,17 @@ protected:
return TestFail;
}
+ /*
+ * Test that dynamically allocated timers are stopped when
+ * deleted. This will result in a crash on failure.
+ */
+ ManagedTimer *dyntimer = new ManagedTimer();
+ dyntimer->start(100);
+ delete dyntimer;
+
+ timer.start(200);
+ dispatcher->processEvents();
+
return TestPass;
}