Lines Matching refs:ASSERT
41 ASSERT(0 == uv_is_active(handle)); in once_close_cb()
51 ASSERT(0 == uv_is_active((uv_handle_t*) handle)); in once_cb()
75 ASSERT(1 == uv_is_active((uv_handle_t*) handle)); in repeat_cb()
98 ASSERT(0 < start_time); in TEST_IMPL()
104 ASSERT(r == 0); in TEST_IMPL()
106 ASSERT(r == 0); in TEST_IMPL()
111 ASSERT(r == 0); in TEST_IMPL()
113 ASSERT(r == 0); in TEST_IMPL()
117 ASSERT(r == 0); in TEST_IMPL()
119 ASSERT(r == 0); in TEST_IMPL()
121 ASSERT(r == 0); in TEST_IMPL()
126 ASSERT(once_cb_called == 10); in TEST_IMPL()
127 ASSERT(once_close_cb_called == 10); in TEST_IMPL()
129 ASSERT(repeat_cb_called == 5); in TEST_IMPL()
130 ASSERT(repeat_close_cb_called == 1); in TEST_IMPL()
132 ASSERT(500 <= uv_now(uv_default_loop()) - start_time); in TEST_IMPL()
144 ASSERT(r == 0); in TEST_IMPL()
146 ASSERT(r == 0); in TEST_IMPL()
148 ASSERT(r == 0); in TEST_IMPL()
150 ASSERT(r == 0); in TEST_IMPL()
152 ASSERT(once_cb_called == 1); in TEST_IMPL()
162 ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
163 ASSERT(0 == uv_timer_get_repeat(&handle)); in TEST_IMPL()
165 ASSERT(0 == uv_is_active((uv_handle_t*) &handle)); in TEST_IMPL()
173 ASSERT(order_cb_called++ == *(int*)handle->data); in order_cb_a()
178 ASSERT(order_cb_called++ == *(int*)handle->data); in order_cb_b()
190 ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_a)); in TEST_IMPL()
191 ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_b)); in TEST_IMPL()
195 ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); in TEST_IMPL()
197 ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); in TEST_IMPL()
198 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()
200 ASSERT(order_cb_called == 2); in TEST_IMPL()
202 ASSERT(0 == uv_timer_stop(&handle_a)); in TEST_IMPL()
203 ASSERT(0 == uv_timer_stop(&handle_b)); in TEST_IMPL()
208 ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); in TEST_IMPL()
211 ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); in TEST_IMPL()
212 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()
214 ASSERT(order_cb_called == 2); in TEST_IMPL()
222 ASSERT(handle == &tiny_timer); in tiny_timer_cb()
230 ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); in TEST_IMPL()
231 ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); in TEST_IMPL()
232 ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer2)); in TEST_IMPL()
233 ASSERT(0 == uv_timer_start(&tiny_timer, tiny_timer_cb, 1, 0)); in TEST_IMPL()
234 ASSERT(0 == uv_timer_start(&huge_timer1, tiny_timer_cb, 0xffffffffffffLL, 0)); in TEST_IMPL()
235 ASSERT(0 == uv_timer_start(&huge_timer2, tiny_timer_cb, (uint64_t) -1, 0)); in TEST_IMPL()
239 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()
249 ASSERT(handle == &huge_timer1); in huge_repeat_cb()
251 ASSERT(handle == &tiny_timer); in huge_repeat_cb()
261 ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); in TEST_IMPL()
262 ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); in TEST_IMPL()
263 ASSERT(0 == uv_timer_start(&tiny_timer, huge_repeat_cb, 2, 2)); in TEST_IMPL()
264 ASSERT(0 == uv_timer_start(&huge_timer1, huge_repeat_cb, 1, (uint64_t) -1)); in TEST_IMPL()
265 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()
282 ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); in TEST_IMPL()
283 ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 0, 0)); in TEST_IMPL()
284 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); in TEST_IMPL()
285 ASSERT(1 == timer_run_once_timer_cb_called); in TEST_IMPL()
287 ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 1, 0)); in TEST_IMPL()
288 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); in TEST_IMPL()
289 ASSERT(2 == timer_run_once_timer_cb_called); in TEST_IMPL()
292 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); in TEST_IMPL()
302 ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
305 ASSERT(UV_EINVAL == uv_timer_start(&handle, never_cb, 100, 100)); in TEST_IMPL()
315 ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
316 ASSERT(UV_EINVAL == uv_timer_start(&handle, NULL, 100, 100)); in TEST_IMPL()
328 ASSERT(hrtime >= timer_early_check_expected_time); in timer_early_check_cb()
338 ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); in TEST_IMPL()
339 ASSERT(0 == uv_timer_start(&timer_handle, timer_early_check_cb, timeout_ms, 0)); in TEST_IMPL()
340 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()
343 ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); in TEST_IMPL()