Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
50e07d1c
Commit
50e07d1c
authored
Mar 09, 2023
by
Abseil Team
Committed by
Copybara-Service
Mar 09, 2023
Browse files
Apply clang-tidy fixes
PiperOrigin-RevId: 515265927 Change-Id: Iea11668fa4bbf08f6d418a3823e836fb5b874dcc
parent
48a1b110
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
googletest/test/googletest-port-test.cc
googletest/test/googletest-port-test.cc
+2
-2
googletest/test/gtest_stress_test.cc
googletest/test/gtest_stress_test.cc
+3
-2
No files found.
googletest/test/googletest-port-test.cc
View file @
50e07d1c
...
...
@@ -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
();
...
...
googletest/test/gtest_stress_test.cc
View file @
50e07d1c
...
...
@@ -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"
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment