diff options
author | Fedor Indutny <fedor@indutny.com> | 2016-05-27 09:59:45 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2016-05-27 09:59:45 -0400 |
commit | 800432e83ea2bc09079b9487a565d41bf36f872c (patch) | |
tree | 1572a58a6958585b5473a50de1ad714a807c8880 /test/src | |
parent | aa6a92fdd3c3e22fee12c4cc9a657034dd5ce184 (diff) | |
download | uv_link_t-800432e83ea2bc09079b9487a565d41bf36f872c.tar.gz |
include: add `arg` to write/shutdown
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/test-uv-link-source-t.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/src/test-uv-link-source-t.c b/test/src/test-uv-link-source-t.c index 31a0c40..99d97d7 100644 --- a/test/src/test-uv-link-source-t.c +++ b/test/src/test-uv-link-source-t.c @@ -7,6 +7,7 @@ static int fds[2]; static uv_loop_t* loop; static uv_pipe_t pair_right; static uv_link_source_t source; +static int test_arg; static int write_cb_called; static int alloc_cb_called; @@ -24,8 +25,9 @@ static void read_one() { CHECK_EQ(buf[0], 'x', "data should match"); } -static void source_write_cb(uv_link_t* link, int status) { +static void source_write_cb(uv_link_t* link, int status, void* arg) { CHECK_EQ(link, &source.link, "link == &source.link"); + CHECK_EQ(arg, &test_arg, "arg == &test_arg"); write_cb_called++; @@ -39,7 +41,7 @@ static void test_writes() { /* .write() should work */ buf = uv_buf_init("x", 1); CHECK_EQ(uv_link_write(&source.link, &source.link, &buf, 1, NULL, - source_write_cb), + source_write_cb, &test_arg), 0, "source.link.write() should return 0"); |