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
aea981dd
Commit
aea981dd
authored
Dec 17, 2021
by
Hossein Ghahramanzadeh
Browse files
Improve code readablity.
parent
4adbc9c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
googletest/src/gtest.cc
googletest/src/gtest.cc
+2
-2
No files found.
googletest/src/gtest.cc
View file @
aea981dd
...
@@ -766,7 +766,7 @@ class PositiveAndNegativeUnitTestFilter {
...
@@ -766,7 +766,7 @@ class PositiveAndNegativeUnitTestFilter {
if
(
positive_and_negative_filters
.
size
()
>
1
)
{
if
(
positive_and_negative_filters
.
size
()
>
1
)
{
positive_filter_
=
UnitTestFilter
{
positive_filter_
=
UnitTestFilter
{
positive_filter
.
size
()
?
positive_filter
:
kUniversalF
ilter
};
positive_filter
.
empty
()
?
kUniversalFilter
:
positive_f
ilter
};
// 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
...
@@ -774,7 +774,7 @@ class PositiveAndNegativeUnitTestFilter {
...
@@ -774,7 +774,7 @@ class PositiveAndNegativeUnitTestFilter {
negative_filter_
=
UnitTestFilter
{
std
::
accumulate
(
negative_filter_
=
UnitTestFilter
{
std
::
accumulate
(
positive_and_negative_filters
.
begin
()
+
2
,
positive_and_negative_filters
.
begin
()
+
2
,
positive_and_negative_filters
.
end
(),
positive_and_negative_filters
[
1
],
positive_and_negative_filters
.
end
(),
positive_and_negative_filters
[
1
],
[](
const
auto
&
lhs
,
const
auto
&
rhs
)
{
return
lhs
+
'-'
+
rhs
;
})};
[](
const
std
::
string
&
lhs
,
const
std
::
string
&
rhs
)
{
return
lhs
+
'-'
+
rhs
;
})};
}
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