From a66bb042e02bd1021a574c32a27fff087ab1c9f4 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 4 Jun 2016 14:46:01 -0400 Subject: Revert "api: `uv_link_strerror`" This reverts commit 0799c7c91ee710eb9ce752bcfcd6952a0838b495. --- test/src/test-list.h | 1 - test/src/test-strerror.c | 35 ----------------------------------- 2 files changed, 36 deletions(-) delete mode 100644 test/src/test-strerror.c (limited to 'test/src') diff --git a/test/src/test-list.h b/test/src/test-list.h index abb7cda..591b858 100644 --- a/test/src/test-list.h +++ b/test/src/test-list.h @@ -6,7 +6,6 @@ V(uv_link_observer_t) \ V(close_depth) \ V(stop_read_on_error) \ - V(strerror) \ #define TEST_DECL(N) void test__##N(); diff --git a/test/src/test-strerror.c b/test/src/test-strerror.c deleted file mode 100644 index c3b44c2..0000000 --- a/test/src/test-strerror.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include - -#include "test-common.h" - -static uv_link_t st_link; - -static int close_cb_called; - - -const char* test_strerror(uv_link_t* l, int err) { - CHECK_EQ(l, &st_link, "link == st_link"); - return "Description"; -} - - -static uv_link_methods_t methods = { - .strerror = test_strerror, - .close = uv_link_default_close -}; - -static void close_cb(uv_link_t* l) { - close_cb_called++; -} - - -TEST_IMPL(strerror) { - CHECK_EQ(uv_link_init(&st_link, &methods), 0, "uv_link_init()"); - - CHECK_EQ(strcmp(uv_link_strerror(&st_link, -1), "Description"), 0, - "error description should match"); - - uv_link_close(&st_link, close_cb); - CHECK_EQ(close_cb_called, 1, "close_cb must be called"); -} -- cgit 1.4.1-2-gfad0