From 974a5bf30ecec76cae440560967d7a9c78c51816 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 19 Jan 2018 13:52:21 -0500 Subject: [PATCH] test: fix incorrect asserts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Saúl Ibarra Corretgé --- test/test-fs-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-fs-event.c b/test/test-fs-event.c index dc47b3a6..39d73300 100644 --- a/test/test-fs-event.c +++ b/test/test-fs-event.c @@ -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,