Skip very large input test in 32-bit as it might cause OOMs.
PiperOrigin-RevId: 738955336
diff --git a/src/google/protobuf/micro_string_test.cc b/src/google/protobuf/micro_string_test.cc
index f8fa01d..c70df7f 100644
--- a/src/google/protobuf/micro_string_test.cc
+++ b/src/google/protobuf/micro_string_test.cc
@@ -783,6 +783,11 @@
}
TEST(MicroStringTest, SetInChunksWontPreallocateForVeryLargeFakeSize) {
+ if (sizeof(void*) < 8) {
+ GTEST_SKIP() << "Might not be possible to allocate that much memory on "
+ "this platform.";
+ }
+
MicroString str;
str.SetInChunks(1'000'000'000, nullptr, [](auto append) {
append("first");