Skip to content

Commit

Permalink
Fix any_test.cc on 32-bit Windows
Browse files Browse the repository at this point in the history
This test case attempts to pack an Any with a message over 2 GiB in size, but
the allocation is failing in our 32-bit Windows test. This change should fix
the problem by skipping the test case on 32-bit platforms.

PiperOrigin-RevId: 669082000
  • Loading branch information
acozzette authored and copybara-github committed Aug 29, 2024
1 parent e603dd3 commit eec827d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/any_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TEST(AnyTest, TestPackAndUnpack) {
}

TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {
if (std::string().max_size() < INT_MAX) {
if (sizeof(size_t) == 4) {
GTEST_SKIP() << "This toolchain can't allocate that much memory.";
}
protobuf_unittest::TestAny submessage;
Expand Down

0 comments on commit eec827d

Please sign in to comment.