summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2019-01-29 17:36:56 +0000
committerPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2019-01-29 17:36:56 +0000
commit546a15282a0df278c753cfc9f53153d0654bfbaa (patch)
treec83f4cc85ee31ecc31cfab8b8fd778a9900b4721 /t
parent87071da200aae607a303329ce2acd954eee04d0e (diff)
Tickit event loop function renaming - use 'watch' as a common naming prefix
Diffstat (limited to 't')
-rw-r--r--t/51tickit-timer.c24
-rw-r--r--t/52tickit-later.c6
2 files changed, 15 insertions, 15 deletions
diff --git a/t/51tickit-timer.c b/t/51tickit-timer.c
index 07d6ca1..4fc1faa 100644
--- a/t/51tickit-timer.c
+++ b/t/51tickit-timer.c
@@ -42,11 +42,11 @@ int main(int argc, char *argv[])
{
int called = 0;
- tickit_timer_after_msec(t, 10, 0, &on_call_incr, &called);
+ tickit_watch_timer_after_msec(t, 10, 0, &on_call_incr, &called);
tickit_run(t);
- is_int(called, 1, "tickit_timer_after_msec invokes callback");
+ is_int(called, 1, "tickit_watch_timer_after_msec invokes callback");
}
/* two timers with ordering */
@@ -56,34 +56,34 @@ int main(int argc, char *argv[])
state_a = { .counterp = &counter },
state_b = { .counterp = &counter };
- tickit_timer_after_msec(t, 10, 0, &on_call_capture, &state_a);
- tickit_timer_after_msec(t, 20, 0, &on_call_capture, &state_b);
+ tickit_watch_timer_after_msec(t, 10, 0, &on_call_capture, &state_a);
+ tickit_watch_timer_after_msec(t, 20, 0, &on_call_capture, &state_b);
tickit_run(t);
- is_int(state_a.capture, 2, "tickit_timer_after_msec first capture");
- is_int(state_b.capture, 1, "tickit_timer_after_msec second capture");
+ is_int(state_a.capture, 2, "tickit_watch_timer_after_msec first capture");
+ is_int(state_b.capture, 1, "tickit_watch_timer_after_msec second capture");
}
/* timer cancellation */
{
int called = 0;
- tickit_timer_after_msec(t, 10, 0, &on_call_incr, &called);
+ tickit_watch_timer_after_msec(t, 10, 0, &on_call_incr, &called);
int not_called = 0;
- void *cookie = tickit_timer_after_msec(t, 5, TICKIT_BIND_UNBIND, &on_call_incr, &not_called);
+ void *cookie = tickit_watch_timer_after_msec(t, 5, TICKIT_BIND_UNBIND, &on_call_incr, &not_called);
unbound_count = 0;
- tickit_timer_cancel(t, cookie);
- is_int(unbound_count, 1, "unbound_count after tickit_timer_cancel");
+ tickit_watch_cancel(t, cookie);
+ is_int(unbound_count, 1, "unbound_count after tickit_watch_cancel");
tickit_run(t);
- ok(!not_called, "tickit_timer_cancel prevents invocation");
+ ok(!not_called, "tickit_watch_cancel prevents invocation");
}
/* object destruction */
{
- tickit_timer_after_msec(t, 10, TICKIT_BIND_DESTROY, &on_call_incr, NULL);
+ tickit_watch_timer_after_msec(t, 10, TICKIT_BIND_DESTROY, &on_call_incr, NULL);
unbound_count = 0;
diff --git a/t/52tickit-later.c b/t/52tickit-later.c
index 92a1372..8a4f8f3 100644
--- a/t/52tickit-later.c
+++ b/t/52tickit-later.c
@@ -23,16 +23,16 @@ int main(int argc, char *argv[])
{
int called = 0;
- tickit_later(t, 0, &on_call_incr, &called);
+ tickit_watch_later(t, 0, &on_call_incr, &called);
tickit_run(t);
- is_int(called, 1, "tickit_later invokes callback");
+ is_int(called, 1, "tickit_watch_later invokes callback");
}
/* object destruction */
{
- tickit_later(t, TICKIT_BIND_DESTROY, &on_call_incr, NULL);
+ tickit_watch_later(t, TICKIT_BIND_DESTROY, &on_call_incr, NULL);
unbound_count = 0;