Fix any_test.cc on 32-bit Windows

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
pull/18033/head
Adam Cozzette 6 months ago committed by Copybara-Service
parent e603dd3570
commit eec827df1b
  1. 2
      src/google/protobuf/any_test.cc

@ -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;

Loading…
Cancel
Save