From 31fc52ab53b5dde882ebadbbc912c2848c7b6a83 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 11 Jan 2013 13:49:45 +0100 Subject: deps: upgrade libuv to 9aab5d4 --- deps/uv/test/test-ref.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'deps/uv/test/test-ref.c') diff --git a/deps/uv/test/test-ref.c b/deps/uv/test/test-ref.c index bc0030d34a..7b1de1ddfc 100644 --- a/deps/uv/test/test-ref.c +++ b/deps/uv/test/test-ref.c @@ -58,6 +58,11 @@ static void fail_cb(void) { } +static void fail_cb2(void) { + ASSERT(0 && "fail_cb2 should not have been called"); +} + + static void req_cb(uv_handle_t* req, int status) { req_cb_called++; } @@ -104,7 +109,7 @@ TEST_IMPL(ref) { TEST_IMPL(idle_ref) { uv_idle_t h; uv_idle_init(uv_default_loop(), &h); - uv_idle_start(&h, NULL); + uv_idle_start(&h, (uv_idle_cb) fail_cb2); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); @@ -127,7 +132,7 @@ TEST_IMPL(async_ref) { TEST_IMPL(prepare_ref) { uv_prepare_t h; uv_prepare_init(uv_default_loop(), &h); - uv_prepare_start(&h, NULL); + uv_prepare_start(&h, (uv_prepare_cb) fail_cb2); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); @@ -139,7 +144,7 @@ TEST_IMPL(prepare_ref) { TEST_IMPL(check_ref) { uv_check_t h; uv_check_init(uv_default_loop(), &h); - uv_check_start(&h, NULL); + uv_check_start(&h, (uv_check_cb) fail_cb2); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop()); do_close(&h); @@ -235,19 +240,12 @@ TEST_IMPL(tcp_ref2) { } -static void tcp_ref2b_close_cb(uv_handle_t* handle) { - (*(int*) handle->data)++; -} - - TEST_IMPL(tcp_ref2b) { - int close_cb_called = 0; uv_tcp_t h; - h.data = &close_cb_called; uv_tcp_init(uv_default_loop(), &h); uv_listen((uv_stream_t*)&h, 128, (uv_connection_cb)fail_cb); uv_unref((uv_handle_t*)&h); - uv_close((uv_handle_t*)&h, tcp_ref2b_close_cb); + uv_close((uv_handle_t*)&h, close_cb); uv_run(uv_default_loop()); ASSERT(close_cb_called == 1); MAKE_VALGRIND_HAPPY(); -- cgit v1.2.3