test: fix incorrect asserts
This commit fixes two assertions of the form (events == UV_CHANGE || UV_RENAME) which always passed because UV_RENAME is 1. Refs: https://github.com/libuv/help/issues/41 PR-URL: https://github.com/libuv/libuv/pull/1722 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
faa52872b9
commit
974a5bf30e
@ -199,7 +199,7 @@ static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle,
|
||||
fs_event_cb_called++;
|
||||
ASSERT(handle == &fs_event);
|
||||
ASSERT(status == 0);
|
||||
ASSERT(events == UV_CHANGE || UV_RENAME);
|
||||
ASSERT(events == UV_CHANGE || events == UV_RENAME);
|
||||
#if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
|
||||
ASSERT(strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0);
|
||||
#else
|
||||
@ -283,7 +283,7 @@ static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle,
|
||||
fs_event_cb_called++;
|
||||
ASSERT(handle == &fs_event);
|
||||
ASSERT(status == 0);
|
||||
ASSERT(events == UV_CHANGE || UV_RENAME);
|
||||
ASSERT(events == UV_CHANGE || events == UV_RENAME);
|
||||
#if defined(__APPLE__) || defined(_WIN32) || defined(__linux__)
|
||||
ASSERT(strncmp(filename,
|
||||
file_prefix_in_subdir,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user