From ecb18f0b032c334d0ead69531d510643bd2ffaef Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 27 Jul 2026 21:17:08 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 955003621 Change-Id: I83518a7f947d9f7d9b89fe14e1219d32bcdc95a3 --- googlemock/test/gmock_stress_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc index 9e42cd935..f45cf67a6 100644 --- a/googlemock/test/gmock_stress_test.cc +++ b/googlemock/test/gmock_stress_test.cc @@ -30,6 +30,8 @@ // Tests that Google Mock constructs can be used in a large number of // threads concurrently. +#include + #include "gmock/gmock.h" #include "gtest/gtest.h" @@ -188,7 +190,7 @@ TEST(StressTest, CanUseGMockWithThreads) { &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 kTestThreads = kCopiesOfEachRoutine * kRoutines; ThreadWithParam* threads[kTestThreads] = {};