Skip to content

Commit 3a73b43

Browse files
committed
fix windows build
1 parent f094520 commit 3a73b43

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

silkworm/db/chain/remote_chain_storage_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <catch2/catch_test_macros.hpp>
99
#include <catch2/matchers/catch_matchers_exception.hpp>
10-
#include <gmock/gmock.h>
1110
#include <nlohmann/json.hpp>
1211

1312
#include <silkworm/core/common/util.hpp>
@@ -55,6 +54,9 @@ struct RemoteChainStorageTest : public silkworm::test_util::ContextTestBase {
5554
chain::Providers& providers{storage.providers()};
5655
};
5756

57+
// Exclude on MSVC due to error LNK2001: unresolved external symbol testing::Matcher<class std::basic_string_view...
58+
// See also https://github.com/google/googletest/issues/4357
59+
#ifndef _WIN32
5860
TEST_CASE_METHOD(RemoteChainStorageTest, "read_chain_config") {
5961
SECTION("empty chain data") {
6062
EXPECT_CALL(transaction, get_one(table::kConfigName, _)).WillOnce(InvokeWithoutArgs([]() -> Task<Bytes> {
@@ -94,6 +96,7 @@ TEST_CASE_METHOD(RemoteChainStorageTest, "read_chain_config") {
9496
})"_json);
9597
}
9698
}
99+
#endif // _WIN32
97100

98101
TEST_CASE_METHOD(RemoteChainStorageTest, "read_transaction_by_idx_in_block") {
99102
SECTION("not found") {

silkworm/execution/remote_state_test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <boost/asio/use_future.hpp>
88
#include <catch2/catch_test_macros.hpp>
99
#include <evmc/evmc.hpp>
10-
#include <gmock/gmock.h>
1110

1211
#include <silkworm/core/common/base.hpp>
1312
#include <silkworm/core/common/bytes.hpp>
@@ -33,6 +32,9 @@ struct RemoteStateTest : public silkworm::test_util::ContextTestBase {
3332
db::test_util::MockStateCache state_cache;
3433
};
3534

35+
// Exclude on MSVC due to error LNK2001: unresolved external symbol testing::Matcher<class std::basic_string_view...
36+
// See also https://github.com/google/googletest/issues/4357
37+
#ifndef _WIN32
3638
TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buffer]") {
3739
auto cursor = std::make_shared<silkworm::db::test_util::MockCursor>();
3840
const evmc::address address{0x0715a7794a1dc8e42615f059dd6e406a6594651a_address};
@@ -304,8 +306,9 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf
304306
CHECK(canonical_hash == std::nullopt);
305307
}
306308
}
309+
#endif // _WIN32
307310

308-
// Exclude gRPC tests from sanitizer builds due to data race warnings inside gRPC library
311+
// Exclude gRPC tests from sanitizer builds due to data race warnings inside the gRPC library
309312
#ifndef SILKWORM_SANITIZE
310313
TEST_CASE_METHOD(RemoteStateTest, "RemoteState") {
311314
RemoteState remote_state(current_executor, transaction, chain_storage, 0);

0 commit comments

Comments
 (0)