Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
f7779eb3
Commit
f7779eb3
authored
Nov 20, 2018
by
Abseil Team
Committed by
Gennadiy Civil
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Remove unintended dependency. PiperOrigin-RevId: 222243874
parent
64368e05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
gmock-pp-string_test.cc
googlemock/test/gmock-pp-string_test.cc
+7
-5
No files found.
googlemock/test/gmock-pp-string_test.cc
View file @
f7779eb3
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
// This file tests the internal preprocessor macro library.
// This file tests the internal preprocessor macro library.
#include "gmock/internal/gmock-pp.h"
#include "gmock/internal/gmock-pp.h"
#include
"absl/strings/str_join.h"
#include
<string>
#include "absl/strings/str_split.h"
#include "gmock/gmock.h"
#include "gmock/gmock.h"
namespace
testing
{
namespace
testing
{
...
@@ -41,9 +41,11 @@ namespace {
...
@@ -41,9 +41,11 @@ namespace {
// Matcher to verify that to strings are identical up to whitespace
// Matcher to verify that to strings are identical up to whitespace
// Not 100% correct, because it treats "AB" as equal to "A B".
// Not 100% correct, because it treats "AB" as equal to "A B".
::
testing
::
Matcher
<
string
>
SameExceptSpaces
(
absl
::
string_view
s
)
{
::
testing
::
Matcher
<
const
std
::
string
&>
SameExceptSpaces
(
const
std
::
string
&
s
)
{
auto
remove_spaces
=
[](
const
absl
::
string_view
&
to_split
)
{
auto
remove_spaces
=
[](
std
::
string
to_split
)
{
return
absl
::
StrJoin
(
absl
::
StrSplit
(
to_split
,
' '
),
""
);
to_split
.
erase
(
std
::
remove
(
to_split
.
begin
(),
to_split
.
end
(),
' '
),
to_split
.
end
());
return
to_split
;
};
};
return
::
testing
::
ResultOf
(
remove_spaces
,
remove_spaces
(
s
));
return
::
testing
::
ResultOf
(
remove_spaces
,
remove_spaces
(
s
));
}
}
...
...
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