Merge e47d3878697e9d2974979035acbd555d6d2be1d5 into d72f9c8aea6817cdf1ca0ac10887f328de7f3da2

This commit is contained in:
Niels Dekker 2026-03-31 11:33:36 -04:00 committed by GitHub
commit 5ec5a601b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,7 +170,14 @@ struct ContainerPrinter {
!IsRecursiveContainer<T>::value) ||
IsStdSpan<T>::value>::type>
static void PrintValue(const T& container, std::ostream* os) {
const size_t kMaxCount = 32; // The maximum number of elements to print.
// The maximum number of elements to print.
#ifdef GTEST_MAX_NUM_ELEMENTS_TO_PRINT
const size_t kMaxCount = GTEST_MAX_NUM_ELEMENTS_TO_PRINT;
#else
const size_t kMaxCount = 32;
#endif
*os << '{';
size_t count = 0;
for (auto&& elem : container) {