test: add 'is active?' checks to test-timer.c
This commit is contained in:
parent
34445d0741
commit
ae9d4c2aab
@ -35,6 +35,7 @@ static void once_close_cb(uv_handle_t* handle) {
|
|||||||
printf("ONCE_CLOSE_CB\n");
|
printf("ONCE_CLOSE_CB\n");
|
||||||
|
|
||||||
ASSERT(handle != NULL);
|
ASSERT(handle != NULL);
|
||||||
|
ASSERT(!uv_is_active(handle));
|
||||||
|
|
||||||
once_close_cb_called++;
|
once_close_cb_called++;
|
||||||
}
|
}
|
||||||
@ -45,6 +46,7 @@ static void once_cb(uv_timer_t* handle, int status) {
|
|||||||
|
|
||||||
ASSERT(handle != NULL);
|
ASSERT(handle != NULL);
|
||||||
ASSERT(status == 0);
|
ASSERT(status == 0);
|
||||||
|
ASSERT(!uv_is_active((uv_handle_t*)handle));
|
||||||
|
|
||||||
once_cb_called++;
|
once_cb_called++;
|
||||||
|
|
||||||
@ -69,6 +71,7 @@ static void repeat_cb(uv_timer_t* handle, int status) {
|
|||||||
|
|
||||||
ASSERT(handle != NULL);
|
ASSERT(handle != NULL);
|
||||||
ASSERT(status == 0);
|
ASSERT(status == 0);
|
||||||
|
ASSERT(uv_is_active((uv_handle_t*)handle));
|
||||||
|
|
||||||
repeat_cb_called++;
|
repeat_cb_called++;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user