Skip to content

Commit

Permalink
fix CI in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
acking-you committed Nov 30, 2023
1 parent 88d1490 commit 085b8f3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dependencies/elog4cpp/fetch_elog4cpp.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CPMAddPackage(
NAME elog4cpp
GIT_REPOSITORY https://gitee.com/acking-you/elog4cpp.git
GIT_TAG origin/fetch
GIT_TAG origin/master
GIT_SHALLOW TRUE
)
4 changes: 2 additions & 2 deletions netpoll/net/tcp_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class TcpConnection
*/
bool hasContext() const
{
#if __cplusplus >= 201703L
#if __cplusplus >= 201703L || (_MSC_VER && _MSVC_LANG >= 201703L)
return m_context.has_value();
#else
return m_context.empty();
Expand All @@ -176,7 +176,7 @@ class TcpConnection
*/
void clearContext()
{
#if __cplusplus >= 201703L
#if __cplusplus >= 201703L || (_MSC_VER && _MSVC_LANG >= 201703L)
m_context.reset();
#else
m_context.clear();
Expand Down
1 change: 0 additions & 1 deletion netpoll/util/string_view.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

// 若cpp版本为17以上则直接使用标准库的string_view,否则使用第三方库的
#if __cplusplus >= 201703L || (_MSC_VER && _MSVC_LANG >= 201703L)
#include <string_view>
namespace netpoll {
Expand Down
3 changes: 2 additions & 1 deletion tests/encode_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <string>

TEST_SUITE_BEGIN("encode_util");
TEST_CASE("In Unix") { CHECK_EQ(1, 1); }
#ifdef _WIN32
using namespace netpoll;
TEST_CASE("test fromUtf8&toUtf8")
Expand Down Expand Up @@ -32,5 +31,7 @@ TEST_CASE("test fromNativePath&toNativePath")
CHECK_EQ(windowsNativePath, netpoll::utils::toNativePath(windowsNetPath));
}
}
#else
TEST_CASE("In Unix") { CHECK_EQ(1, 1); }
#endif
TEST_SUITE_END;
1 change: 1 addition & 0 deletions tests/message_buffer_test.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <doctest/doctest.h>
#include <netpoll/util/message_buffer.h>
#include <iostream>
using namespace netpoll;

TEST_CASE("test MessageBuffer")
Expand Down

0 comments on commit 085b8f3

Please sign in to comment.