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
80d5177d
Unverified
Commit
80d5177d
authored
May 25, 2020
by
ppenguin
Committed by
GitHub
May 25, 2020
Browse files
Use count function instead of handwritten loop
parent
011959aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
googletest/src/gtest-typed-test.cc
googletest/src/gtest-typed-test.cc
+1
-11
No files found.
googletest/src/gtest-typed-test.cc
View file @
80d5177d
...
@@ -78,17 +78,7 @@ const char* TypedTestSuitePState::VerifyRegisteredTestNames(
...
@@ -78,17 +78,7 @@ const char* TypedTestSuitePState::VerifyRegisteredTestNames(
continue
;
continue
;
}
}
bool
found
=
false
;
if
(
registered_tests_
.
count
(
name
)
!=
0
)
{
for
(
RegisteredTestIter
it
=
registered_tests_
.
begin
();
it
!=
registered_tests_
.
end
();
++
it
)
{
if
(
name
==
it
->
first
)
{
found
=
true
;
break
;
}
}
if
(
found
)
{
tests
.
insert
(
name
);
tests
.
insert
(
name
);
}
else
{
}
else
{
errors
<<
"No test named "
<<
name
errors
<<
"No test named "
<<
name
...
...
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