Automated Code Change

PiperOrigin-RevId: 955003621
Change-Id: I83518a7f947d9f7d9b89fe14e1219d32bcdc95a3
This commit is contained in:
Abseil Team 2026-07-27 21:17:08 -07:00 committed by Copybara-Service
parent b78aa5ee64
commit ecb18f0b03

View File

@ -30,6 +30,8 @@
// Tests that Google Mock constructs can be used in a large number of // Tests that Google Mock constructs can be used in a large number of
// threads concurrently. // threads concurrently.
#include <iterator>
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
@ -188,7 +190,7 @@ TEST(StressTest, CanUseGMockWithThreads) {
&TestPartiallyOrderedExpectationsWithThreads, &TestPartiallyOrderedExpectationsWithThreads,
}; };
const int kRoutines = sizeof(test_routines) / sizeof(test_routines[0]); const int kRoutines = std::size(test_routines);
const int kCopiesOfEachRoutine = kMaxTestThreads / kRoutines; const int kCopiesOfEachRoutine = kMaxTestThreads / kRoutines;
const int kTestThreads = kCopiesOfEachRoutine * kRoutines; const int kTestThreads = kCopiesOfEachRoutine * kRoutines;
ThreadWithParam<Dummy>* threads[kTestThreads] = {}; ThreadWithParam<Dummy>* threads[kTestThreads] = {};