Skip to content

Commit

Permalink
Apply clang-tidy fixes
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 515265927
Change-Id: Iea11668fa4bbf08f6d418a3823e836fb5b874dcc
  • Loading branch information
Abseil Team authored and copybara-github committed Mar 9, 2023
1 parent 48a1b11 commit 50e07d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions googletest/test/googletest-port-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,9 @@ TEST(MutexTest, OnlyOneThreadCanLockAtATime) {
// Creates and runs kThreadCount threads that increment locked_counter
// kCycleCount times each.
for (int i = 0; i < kThreadCount; ++i) {
counting_threads[i].reset(new ThreadType(
counting_threads[i] = std::make_unique<ThreadType>(
&CountingThreadFunc, make_pair(&locked_counter, kCycleCount),
&threads_can_start));
&threads_can_start);
}
threads_can_start.Notify();
for (int i = 0; i < kThreadCount; ++i) counting_threads[i]->Join();
Expand Down
5 changes: 3 additions & 2 deletions googletest/test/gtest_stress_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
// Tests that SCOPED_TRACE() and various Google Test assertions can be
// used in a large number of threads concurrently.

#include <memory>
#include <vector>

#include "gtest/gtest.h"
Expand Down Expand Up @@ -118,8 +119,8 @@ TEST(StressTest, CanUseScopedTraceAndAssertionsInManyThreads) {
std::unique_ptr<ThreadWithParam<int> > threads[kThreadCount];
Notification threads_can_start;
for (int i = 0; i != kThreadCount; i++)
threads[i].reset(
new ThreadWithParam<int>(&ManyAsserts, i, &threads_can_start));
threads[i] = std::make_unique<ThreadWithParam<int>>(&ManyAsserts, i,
&threads_can_start);

threads_can_start.Notify();

Expand Down

0 comments on commit 50e07d1

Please sign in to comment.