forked from cory/tildefriends
libuv 1.42.0.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3650 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
11
deps/libuv/test/test-error.c
vendored
11
deps/libuv/test/test-error.c
vendored
@ -37,6 +37,9 @@
|
||||
* See https://github.com/joyent/libuv/issues/210
|
||||
*/
|
||||
TEST_IMPL(error_message) {
|
||||
#if defined(__ASAN__)
|
||||
RETURN_SKIP("Test does not currently work in ASAN");
|
||||
#endif
|
||||
char buf[32];
|
||||
|
||||
/* Cop out. Can't do proper checks on systems with
|
||||
@ -47,13 +50,13 @@ TEST_IMPL(error_message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ASSERT(strstr(uv_strerror(UV_EINVAL), "Success") == NULL);
|
||||
ASSERT_NULL(strstr(uv_strerror(UV_EINVAL), "Success"));
|
||||
ASSERT(strcmp(uv_strerror(1337), "Unknown error") == 0);
|
||||
ASSERT(strcmp(uv_strerror(-1337), "Unknown error") == 0);
|
||||
|
||||
ASSERT(strstr(uv_strerror_r(UV_EINVAL, buf, sizeof(buf)), "Success") == NULL);
|
||||
ASSERT(strstr(uv_strerror_r(1337, buf, sizeof(buf)), "1337") != NULL);
|
||||
ASSERT(strstr(uv_strerror_r(-1337, buf, sizeof(buf)), "-1337") != NULL);
|
||||
ASSERT_NULL(strstr(uv_strerror_r(UV_EINVAL, buf, sizeof(buf)), "Success"));
|
||||
ASSERT_NOT_NULL(strstr(uv_strerror_r(1337, buf, sizeof(buf)), "1337"));
|
||||
ASSERT_NOT_NULL(strstr(uv_strerror_r(-1337, buf, sizeof(buf)), "-1337"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user