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
4fc151ae
"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "c29315dda476f195298ab8da180e564478649b9e"
Commit
4fc151ae
authored
Dec 22, 2021
by
Hossein Ghahramanzadeh
Browse files
Use normal for loop instead of accumulate.
parent
aea981dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
googletest/src/gtest.cc
googletest/src/gtest.cc
+5
-5
No files found.
googletest/src/gtest.cc
View file @
4fc151ae
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#include <limits>
#include <limits>
#include <list>
#include <list>
#include <map>
#include <map>
#include <numeric>
#include <ostream> // NOLINT
#include <ostream> // NOLINT
#include <sstream>
#include <sstream>
#include <vector>
#include <vector>
...
@@ -771,10 +770,11 @@ class PositiveAndNegativeUnitTestFilter {
...
@@ -771,10 +770,11 @@ class PositiveAndNegativeUnitTestFilter {
// TODO: Fail on multiple '-' characters
// TODO: Fail on multiple '-' characters
// For the moment to preserve old behavior we concatenate the rest of the
// For the moment to preserve old behavior we concatenate the rest of the
// string parts with `-` as separator to generate the negative filter.
// string parts with `-` as separator to generate the negative filter.
negative_filter_
=
UnitTestFilter
{
std
::
accumulate
(
auto
negative_filter_string
=
positive_and_negative_filters
[
1
];
positive_and_negative_filters
.
begin
()
+
2
,
for
(
std
::
size_t
i
=
2
;
i
<
positive_and_negative_filters
.
size
();
i
++
)
positive_and_negative_filters
.
end
(),
positive_and_negative_filters
[
1
],
negative_filter_string
=
[](
const
std
::
string
&
lhs
,
const
std
::
string
&
rhs
)
{
return
lhs
+
'-'
+
rhs
;
})};
negative_filter_string
+
'-'
+
positive_and_negative_filters
[
i
];
negative_filter_
=
UnitTestFilter
{
negative_filter_string
};
}
else
{
}
else
{
// In case we don't have a negative filter and positive filter is ""
// In case we don't have a negative filter and positive filter is ""
// we do not use kUniversalFilter by design as opposed to when we have a
// we do not use kUniversalFilter by design as opposed to when we have a
...
...
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