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:
2021-07-27 22:08:18 +00:00
parent 5197eb91f7
commit da51e87774
183 changed files with 4013 additions and 1768 deletions

View File

@ -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;
}