Skip to content

Commit

Permalink
Fix wait_handle unit tests on linux and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Jul 30, 2023
1 parent d9420d5 commit 090906b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#if defined(_WIN32)
#include <Windows.h>
#undef max
#elseif defined(__linux__) || defined(__APPLE__)
#include <semaphore.h>
#endif

using namespace xtd::threading;
Expand Down Expand Up @@ -57,8 +59,8 @@ namespace xtd::tests {
void test_method_(invalid_handle) {
#if defined(_WIN32)
assert::are_equal(reinterpret_cast<intptr>(INVALID_HANDLE_VALUE), wait_handle::invalid_handle, csf_);
#else
assert::are_equal(0, wait_handle::invalid_handle, csf_);
#elseif defined(__linux__) || defined(__APPLE__)
assert::are_equal(reinterpret_cast<intptr>(SEM_FAILED), wait_handle::invalid_handle, csf_);
#endif
}

Expand Down

0 comments on commit 090906b

Please sign in to comment.