[vlc-commits] timer: add some test cases

Rémi Denis-Courmont git at videolan.org
Mon Jul 13 21:03:45 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 13 22:03:38 2015 +0300| [f95928707d15798ffde5861fda92882ccd43ad9e] | committer: Rémi Denis-Courmont

timer: add some test cases

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f95928707d15798ffde5861fda92882ccd43ad9e
---

 src/test/timer.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/test/timer.c b/src/test/timer.c
index 1ce746c..2525bf8 100644
--- a/src/test/timer.c
+++ b/src/test/timer.c
@@ -57,6 +57,17 @@ int main (void)
 
     val = vlc_timer_create (&data.timer, callback, &data);
     assert (val == 0);
+    vlc_timer_destroy (data.timer);
+    assert (data.count == 0);
+
+    val = vlc_timer_create (&data.timer, callback, &data);
+    assert (val == 0);
+    vlc_timer_schedule (data.timer, false, CLOCK_FREQ << 20, CLOCK_FREQ);
+    vlc_timer_destroy (data.timer);
+    assert (data.count == 0);
+
+    val = vlc_timer_create (&data.timer, callback, &data);
+    assert (val == 0);
 
     /* Relative timer */
     vlc_timer_schedule (data.timer, false, 1, CLOCK_FREQ / 100);



More information about the vlc-commits mailing list