Created
May 29, 2020 14:42
-
-
Save elindsey/784fe0bffa2b25d7c620aeaec12e4c65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index 274f4fc..a6625f0 100644 | |
--- a/src/uvw/handle.hpp | |
+++ b/src/uvw/handle.hpp | |
@@ -264,7 +264,7 @@ public: | |
* @return The file descriptor attached to the hande or a negative value in | |
* case of errors. | |
*/ | |
- OSFileDescriptor fileno() const { | |
+ OSFileDescriptor fd() const { | |
uv_os_fd_t fd; | |
uv_fileno(this->template get<uv_handle_t>(), &fd); | |
return fd; | |
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt | |
index 8d0b3e7..b74665a 100644 | |
--- a/test/CMakeLists.txt | |
+++ b/test/CMakeLists.txt | |
@@ -29,14 +29,13 @@ else() | |
target_compile_features(gtest PUBLIC cxx_std_17) | |
target_compile_features(gtest_main PUBLIC cxx_std_17) | |
+ target_compile_options(gtest PRIVATE -Wno-error) | |
target_compile_features(gmock PUBLIC cxx_std_17) | |
target_compile_features(gmock_main PUBLIC cxx_std_17) | |
endif() | |
if(WIN32) | |
set(WINSOCK2 ws2_32) | |
-elseif(NOT APPLE) | |
- find_library(LIBRT rt) | |
endif() | |
function(ADD_UVW_TEST TEST_NAME TEST_SOURCE) | |
diff --git a/test/uvw/handle.cpp b/test/uvw/handle.cpp | |
index 8cea4c0..55aa573 100644 | |
--- a/test/uvw/handle.cpp | |
+++ b/test/uvw/handle.cpp | |
@@ -42,7 +42,7 @@ TEST(Handle, Functionalities) { | |
ASSERT_EQ(handle->recvBufferSize(), static_cast<decltype(handle->recvBufferSize())>(0)); | |
ASSERT_FALSE(handle->recvBufferSize(0)); | |
- ASSERT_NO_THROW(handle->fileno()); | |
+ ASSERT_NO_THROW(handle->fd()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment